83% download-count

Code Review | Download Count

WordPress plugin Download Count scored83%from 54 tests.

About plugin

  • Plugin page: download-count
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-3.4
  • WordPress version: 6.3.1
  • First release: Jun 29, 2016
  • Latest release: Jun 29, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: thambaru (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,269 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Download Count
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.77 ▲0.47
Dashboard /wp-admin3.33 ▲0.0346.78 ▼6.18
Posts /wp-admin/edit.php3.39 ▲0.0241.05 ▼4.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.08 ▼22.69
Media Library /wp-admin/upload.php3.26 ▲0.0234.53 ▲0.84

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Download Count
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲13713.56 ▼0.799.05 ▲7.5646.18 ▲5.97
Dashboard /wp-admin2,195 ▲245.60 ▲0.0292.36 ▲2.6841.90 ▲2.77
Posts /wp-admin/edit.php2,113 ▲131.94 ▼0.0035.12 ▲1.5034.72 ▼3.69
Add New Post /wp-admin/post-new.php1,526 ▼223.16 ▲0.00659.59 ▼37.2764.31 ▲12.83
Media Library /wp-admin/upload.php1,403 ▲64.21 ▲0.0294.57 ▼1.1040.47 ▼4.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/download-count/includes/class-main.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === download-count === )
Please take inspiration from this readme.txt

download-count/download-count.php 85% from 13 tests

"Download Count" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("./l18n/")

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
Good job! No executable or dangerous file extensions detected90 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6273775
JavaScript13015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods110.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected