10% five-things

Code Review | Five Things

WordPress plugin Five Things scored10%from 54 tests.

About plugin

  • Plugin page: five-things
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Dec 26, 2012
  • Latest release: Jan 31, 2013
  • Number of updates: 7
  • Update frequency: every 5.7 days
  • Top authors: paulo4lzn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,100 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/five-things/five-things.php+564
    Declaration of FiveThings_Widget::widget() should be compatible with WP_Widget::widget($args, $instance)

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.76ms] Passed 4 tests

Analyzing server-side resources used by Five Things
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.53 ▼37.68
Dashboard /wp-admin2.05 ▼1.266.10 ▼40.97
Posts /wp-admin/edit.php2.05 ▼1.315.47 ▼38.90
Add New Post /wp-admin/post-new.php2.05 ▼3.846.13 ▼89.49
Media Library /wp-admin/upload.php2.05 ▼1.185.78 ▼30.26

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_fivethings_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Five Things
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼1.421.74 ▼0.3642.52 ▼6.03
Dashboard /wp-admin2,204 ▲135.86 ▲0.96104.01 ▲4.4739.96 ▼4.80
Posts /wp-admin/edit.php2,090 ▲42.04 ▲0.0537.38 ▲3.8434.76 ▼1.99
Add New Post /wp-admin/post-new.php1,517 ▼1117.56 ▼0.75660.85 ▲13.3856.07 ▲0.31
Media Library /wp-admin/upload.php1,392 ▲74.21 ▼0.0296.07 ▼3.2941.86 ▼1.70
Five Things /wp-admin/five-things.php260.440.1016.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/five-things/five-things.php+564
    Declaration of FiveThings_Widget::widget() should be compatible with WP_Widget::widget($args, $instance)
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_fivethings_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/five-things/five-things.php:33

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/five-things.php
    • > Network (severe)
    wp-admin/five-things.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Five Things - Widget), #2 (Five Things - Editor screen), #3 (Five Things - Editor in focus), #4 (Five Things - Advanced settings)
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

five-things/five-things.php Passed 13 tests

Analyzing the main PHP file in "Five Things" version 1.2
42 characters long description:
Manage your best posts with simple plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin6,698 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript95954615,625
CSS37249599
PHP15579474

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for 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.10
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/sprite.png1.66KB1.38KB▼ 17.06%