10% cool-popular-post

Code Review | cool Popular Post

WordPress plugin cool Popular Post scored 10% from 54 tests.

About plugin

  • Plugin page: cool-popular-post
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2013
  • Latest release: Jan 18, 2015
  • Number of updates: 8
  • Update frequency: every 80.4 days
  • Top authors: culplarry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,834 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/cool-popular-post/cool-popular-posts.php+148
    Methods with the same name as their class will not be constructors in a future version of PHP; cool_popular_posts_widget has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼52.69ms] Passed 4 tests

Analyzing server-side resources used by cool Popular Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.295.20 ▼36.52
Dashboard /wp-admin2.19 ▼1.125.53 ▼42.64
Posts /wp-admin/edit.php2.19 ▼1.178.66 ▼43.64
Add New Post /wp-admin/post-new.php2.19 ▼3.705.99 ▼87.97
Media Library /wp-admin/upload.php2.19 ▼1.045.13 ▼32.09

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_cool_popular_posts_widget
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for cool Popular Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.271.97 ▲0.1449.09 ▲4.84
Dashboard /wp-admin2,206 ▲154.86 ▼0.06108.69 ▲6.3841.07 ▼6.01
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0835.25 ▼1.4332.54 ▲1.33
Add New Post /wp-admin/post-new.php1,542 ▲918.39 ▼4.67632.34 ▼13.4259.12 ▲8.02
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.1394.04 ▼16.5741.57 ▼6.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/cool-popular-post/cool-popular-posts.php+148
    Methods with the same name as their class will not be constructors in a future version of PHP; cool_popular_posts_widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_cool_popular_posts_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cool-popular-post/cool-popular-posts.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Screenshot #1 (Screenshot of Widget) image missing
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

cool-popular-post/cool-popular-posts.php 92% from 13 tests

The main PHP file in "cool Popular Post" ver. 1.0 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: The principal plugin file should be the same as the plugin slug ("cool-popular-post.php" instead of "cool-popular-posts.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
No dangerous file extensions were detected331 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP16933213
PO File44381118

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin