84% easy-download-media-counter

Code Review | Easy Download Media Counter

WordPress plugin Easy Download Media Counter scored84%from 54 tests.

About plugin

  • Plugin page: easy-download-med...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 6, 2012
  • Latest release: Feb 5, 2013
  • Number of updates: 8
  • Update frequency: every 30.6 days
  • Top authors: corsonr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /10,504 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Easy Download Media Counter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.92 ▼6.09
Dashboard /wp-admin3.33 ▲0.0246.65 ▼4.85
Posts /wp-admin/edit.php3.38 ▲0.0244.67 ▼0.87
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.68 ▲6.27
Media Library /wp-admin/upload.php3.25 ▲0.0235.47 ▲0.90

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Download Media Counter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.74 ▼0.071.83 ▼0.0536.36 ▼14.36
Dashboard /wp-admin2,209 ▲175.92 ▲0.96101.95 ▼8.9140.12 ▼5.27
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0036.37 ▼3.6836.45 ▲5.16
Add New Post /wp-admin/post-new.php1,542 ▼018.44 ▲0.27659.85 ▲51.8550.86 ▼12.34
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0597.70 ▼8.4441.64 ▼3.43

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-download-media-counter/easy-download-media-counter.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Shortcodes), #2 (Admin view)
You can look at the official readme.txt

easy-download-media-counter/easy-download-media-counter.php Passed 13 tests

"Easy Download Media Counter" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
This plugin allows you to easily count downloads for a wordpress media and display it

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
Everything looks great! No dangerous files found in this plugin93 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1534993

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
1 PNG file occupies 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png46.93KB22.60KB▼ 51.84%