84% wad-recent-posts

Code Review | WAD Recent Posts

WordPress plugin WAD Recent Posts scored84%from 54 tests.

About plugin

  • Plugin page: wad-recent-posts
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.6
  • WordPress version: 6.3.1
  • First release: Jan 27, 2021
  • Latest release: Jan 29, 2021
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: habibieamrullah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /365 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼0.77ms] Passed 4 tests

A check of server-side resources used by WAD Recent Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.61 ▼0.39
Dashboard /wp-admin3.32 ▲0.0155.22 ▲2.86
Posts /wp-admin/edit.php3.37 ▲0.0155.22 ▲4.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.49 ▼6.57
Media Library /wp-admin/upload.php3.24 ▲0.0138.61 ▲1.00

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_wad_recent_posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WAD Recent Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.78 ▲0.1443.48 ▼2.38
Dashboard /wp-admin2,195 ▲245.61 ▲0.0383.10 ▼10.3137.02 ▼6.21
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0539.06 ▼2.6534.90 ▼3.45
Add New Post /wp-admin/post-new.php1,527 ▲122.87 ▼0.54672.20 ▼16.6653.42 ▼8.95
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.03110.96 ▲3.3849.72 ▲1.17

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_wad_recent_posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wad-recent-posts/wad-recent-posts.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

wad-recent-posts/wad-recent-posts.php Passed 13 tests

The entry point to "WAD Recent Posts" version 1.0.4 is a PHP file that has certain tags in its header comment area
25 characters long description:
Recent posts list widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin226 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25740196
PO File181030

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin