74% easy-popular-posts

Code Review | Easy Popular Posts

WordPress plugin Easy Popular Posts scored74%from 54 tests.

About plugin

  • Plugin page: easy-popular-posts
  • Plugin version: 15.01.12
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.5.0
  • WordPress version: 6.3.1
  • First release: May 21, 2009
  • Latest release: Apr 6, 2016
  • Number of updates: 56
  • Update frequency: every 44.9 days
  • Top authors: christopherross (98.21%)nickadamstv (3.57%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /232,703 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.70MB] [CPU: ▼44.57ms] Passed 4 tests

Server-side resources used by Easy Popular Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.1714.77 ▼26.06
Dashboard /wp-admin2.30 ▼1.0014.10 ▼36.94
Posts /wp-admin/edit.php2.30 ▼1.0511.19 ▼33.03
Add New Post /wp-admin/post-new.php2.30 ▼3.5811.60 ▼82.26
Media Library /wp-admin/upload.php2.30 ▼0.9311.05 ▼22.63

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Easy Popular Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.084.29 ▲2.4944.04 ▼2.59
Dashboard /wp-admin2,206 ▲145.83 ▲0.8899.37 ▼5.8939.35 ▼3.79
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0538.96 ▲3.8735.63 ▼0.25
Add New Post /wp-admin/post-new.php1,542 ▲1318.27 ▼4.94588.47 ▼89.0559.81 ▲2.00
Media Library /wp-admin/upload.php1,385 ▼34.17 ▼0.05115.07 ▲9.0945.39 ▼1.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in thisismyurl_EasyPopularPosts_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_thisismyurl_easypopularposts_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-popular-posts/widgets/thisismyurl_EasyPopularPosts_Widget.php:3

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

easy-popular-posts/easy-popular-posts.php Passed 13 tests

The entry point to "Easy Popular Posts" version 15.01.12 is a PHP file that has certain tags in its header comment area
68 characters long description:
An easy to use WordPress function to add Popular Posts to any theme.

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
Good job! No executable or dangerous file extensions detected617 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4262267432
PO File256112154
CSS121631

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity16.00
▷ Minimum class complexity7.00
▷ Maximum class complexity32.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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