84% plugin-download-counter

Code Review | Plugin Download Counter

WordPress plugin Plugin Download Counter scored84%from 54 tests.

About plugin

  • Plugin page: plugin-download-c...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7.3
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Mar 18, 2017
  • Number of updates: 11
  • Update frequency: every 2.6 days
  • Top authors: munishsandy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /519 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.81ms] Passed 4 tests

Server-side resources used by Plugin Download Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.26 ▼3.51
Dashboard /wp-admin3.32 ▲0.0148.51 ▲0.41
Posts /wp-admin/edit.php3.37 ▲0.0151.01 ▼14.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.51 ▼6.01
Media Library /wp-admin/upload.php3.24 ▲0.0135.86 ▲1.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plugin Download Counter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.24 ▼0.111.60 ▼0.0341.93 ▲0.35
Dashboard /wp-admin2,208 ▲285.61 ▼0.0284.34 ▼6.8436.32 ▼3.58
Posts /wp-admin/edit.php2,116 ▲162.01 ▼0.0139.74 ▼1.9535.72 ▼3.56
Add New Post /wp-admin/post-new.php1,538 ▲1023.53 ▲0.35651.50 ▼9.3755.65 ▲1.97
Media Library /wp-admin/upload.php1,416 ▲224.22 ▲0.0593.56 ▼4.7242.09 ▼0.71

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/plugin-download-counter/plugin-download-counter.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: counter, plugin, ratings, download counter, download...

plugin-download-counter/plugin-download-counter.php Passed 13 tests

The principal PHP file in "Plugin Download Counter" v. 1.0 is loaded by WordPress automatically on each request
67 characters long description:
Counts Plugin Downloads and ratings on wordpress from wordpress.org

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
There were no executable files found in this plugin50 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP251150

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin