93% hello-motivation

Code Review | Hello Motivation

WordPress plugin Hello Motivation scored 93% from 54 tests.

About plugin

  • Plugin page: hello-motivation
  • Plugin version: 0.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5
  • WordPress version: 5.8.1
  • First release: Dec 15, 2012
  • Latest release: Dec 16, 2012
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: jwmcgregor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 798 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼146.33ms] Passed 4 tests

Analyzing server-side resources used by Hello Motivation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.04 ▲10.10
Dashboard /wp-admin3.07 ▲0.0136.62 ▼10.28
Posts /wp-admin/edit.php3.12 ▲0.0144.77 ▲1.57
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.07 ▼577.30
Media Library /wp-admin/upload.php3.01 ▲0.0133.49 ▲0.70

Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Hello Motivation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,685 ▲8915.99 ▲0.4710.66 ▲2.1443.98 ▼3.37
Dashboard /wp-admin2,970 ▲365.85 ▼0.11144.35 ▼9.79109.06 ▲2.46
Posts /wp-admin/edit.php2,745 ▲62.72 ▲0.0066.30 ▲1.1798.50 ▲10.89
Add New Post /wp-admin/post-new.php1,505 ▼17818.45 ▼0.33397.09 ▲0.84115.34 ▲0.06
Media Library /wp-admin/upload.php1,816 ▲95.05 ▼0.00156.78 ▲5.22115.87 ▼11.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hello-motivation/motivation.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Screenshot #1 (Screenshot of plugin in action) image not found
  • Screenshots: Please describe screenshot #0 in hello-motivation/assets to your readme.txt
The official readme.txt is a good inspiration

hello-motivation/motivation.php 85% from 13 tests

The principal PHP file in "Hello Motivation" v. 0.1.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 374 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hello-motivation.php" instead of "motivation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin46 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192046

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot1.png163.05KB64.75KB▼ 60.29%