84% popular-post-widget

Code Review | Popular Post Widget

WordPress plugin Popular Post Widget scored 84% from 54 tests.

About plugin

  • Plugin page: popular-post-widget
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: Dec 2, 2017
  • Number of updates: 5
  • Update frequency: every 111.4 days
  • Top authors: itzmostafiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 9,717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.69ms] Passed 4 tests

An overview of server-side resources used by Popular Post Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.33 ▲0.92
Dashboard /wp-admin3.32 ▲0.0244.08 ▼4.07
Posts /wp-admin/edit.php3.37 ▲0.0249.52 ▲1.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.53 ▼5.12
Media Library /wp-admin/upload.php3.25 ▲0.0236.22 ▲2.57

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_popular_post_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Popular Post Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.48 ▼0.272.55 ▲0.9344.38 ▼0.06
Dashboard /wp-admin2,203 ▲155.80 ▲0.9397.91 ▼16.4840.18 ▼2.75
Posts /wp-admin/edit.php2,086 ▼61.99 ▼0.0440.06 ▲0.0735.09 ▼2.00
Add New Post /wp-admin/post-new.php1,542 ▼018.39 ▼0.05624.71 ▲13.8054.33 ▼0.86
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0397.24 ▼1.7342.74 ▼2.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_popular_post_widget
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/popular-post-widget/inc/pplr_post_script.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Initial front-end view of popular posts.)
Please take inspiration from this readme.txt

popular-post-widget/popular-post.php 92% from 13 tests

The main PHP file in "Popular Post Widget" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("popular-post-widget.php" instead of "popular-post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin93 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2333586
CSS1007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.35KB6.21KB▼ 49.76%