84% download-monitor-migrate-download-counts

Code Review | Download Monitor - Migrate download counts

WordPress plugin Download Monitor - Migrate download counts scored 84% from 54 tests.

About plugin

  • Plugin page: download-monitor-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Nov 1, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 8
  • Update frequency: every 35.8 days
  • Top authors: raldea89 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,210 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
Installer ran successfully

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

Server-side resources used by Download Monitor - Migrate download counts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.86 ▼4.66
Dashboard /wp-admin3.32 ▲0.0143.97 ▼4.86
Posts /wp-admin/edit.php3.37 ▲0.0145.81 ▲0.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.79 ▼11.57
Media Library /wp-admin/upload.php3.24 ▲0.0133.56 ▼1.56

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Download Monitor - Migrate download counts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5713.23 ▼1.521.69 ▼0.2642.62 ▼0.06
Dashboard /wp-admin2,209 ▲184.78 ▼0.11106.56 ▲3.7743.13 ▼1.59
Posts /wp-admin/edit.php2,095 ▲62.03 ▼0.0039.74 ▼0.7533.37 ▼2.59
Add New Post /wp-admin/post-new.php1,537 ▲923.28 ▲4.94645.02 ▼11.8250.24 ▼9.76
Media Library /wp-admin/upload.php1,394 ▲94.19 ▼0.0198.67 ▼1.0143.72 ▼1.66

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/download-monitor-migrate-download-counts/dlm-migrate-download-counts.php:421

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
Please take inspiration from this readme.txt

download-monitor-migrate-download-counts/dlm-migrate-download-counts.php 92% from 13 tests

This is the main PHP file of "Download Monitor - Migrate download counts" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("download-monitor-migrate-download-counts.php" instead of "dlm-migrate-download-counts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected264 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17582264

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.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
There were not PNG files found in your plugin