84% easy-popular-posts-widget

Code Review | Easy Popular Posts Widget

WordPress plugin Easy Popular Posts Widget scored84%from 54 tests.

About plugin

  • Plugin page: easy-popular-post...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 17, 2016
  • Latest release: Jun 17, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: rakib8373 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,066 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.12MB] [CPU: ▼10.84ms] Passed 4 tests

This is a short check of server-side resources used by Easy Popular Posts Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▼0.0239.53 ▼11.14
Dashboard /wp-admin3.32 ▲0.0147.98 ▼3.52
Posts /wp-admin/edit.php3.37 ▼0.4848.48 ▼14.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.38 ▼14.56
Media Library /wp-admin/upload.php3.24 ▲0.0134.78 ▼1.51

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

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

Browser metrics Passed 4 tests

Easy Popular Posts Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.25 ▼0.271.60 ▼0.1841.43 ▼7.29
Dashboard /wp-admin2,195 ▲185.56 ▼0.0588.85 ▼8.6238.33 ▼3.38
Posts /wp-admin/edit.php2,110 ▲101.95 ▼0.0440.70 ▲2.1834.99 ▲2.25
Add New Post /wp-admin/post-new.php1,526 ▼022.93 ▼0.68635.94 ▼21.9554.10 ▼1.45
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.01101.57 ▼3.9143.02 ▼3.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_raeppw_popular_posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/easy-popular-posts-widget/assets/raeppw-post-counter.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: widget, popular, popular posts widget, popular posts

easy-popular-posts-widget/easy-popular-posts-widget.php 92% from 13 tests

The main PHP script in "Easy Popular Posts Widget" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin159 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25326141
CSS13018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/comments.png0.46KB0.68KB0.00%
assets/images/eye.png0.43KB0.64KB0.00%