84% richlist-widget

Code Review | RichList Widget

WordPress plugin RichList Widget scored 84% from 54 tests.

About plugin

  • Plugin page: richlist-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 5.8.1
  • First release: Aug 23, 2014
  • Latest release: Aug 24, 2014
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: Shine Sudarsanan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼145.60ms] Passed 4 tests

A check of server-side resources used by RichList Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.00 ▲10.38
Dashboard /wp-admin3.09 ▲0.0342.70 ▼3.14
Posts /wp-admin/edit.php3.14 ▲0.0338.50 ▼3.76
Add New Post /wp-admin/post-new.php5.45 ▲0.0186.91 ▼573.80
Media Library /wp-admin/upload.php3.03 ▲0.0332.12 ▼1.68

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
widget_rich_list_widget

Browser metrics Passed 4 tests

Checking browser requirements for RichList Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲22316.82 ▲1.3215.06 ▲4.1148.93 ▲0.68
Dashboard /wp-admin2,967 ▲336.08 ▲0.10132.19 ▼6.28116.58 ▼4.92
Posts /wp-admin/edit.php2,736 ▼32.84 ▲0.1365.24 ▲0.3187.02 ▼10.18
Add New Post /wp-admin/post-new.php1,504 ▼11118.52 ▼2.81367.66 ▲93.31111.89 ▲5.53
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.05143.37 ▼7.93114.50 ▼2.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_rich_list_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/richlist-widget/wp-richlist.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: category, listing, widget, posts, accordion

richlist-widget/wp-richlist.php 92% from 13 tests

The main file in "RichList Widget" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("richlist-widget.php" instead of "wp-richlist.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin128 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1554119
CSS1006
JavaScript1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin