74% electric-studio-download-counter

Code Review | Electric Studio Download Counter

WordPress plugin Electric Studio Download Counter scored74%from 54 tests.

About plugin

  • Plugin page: electric-studio-d...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.1.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2011
  • Latest release: Apr 22, 2015
  • Number of updates: 51
  • Update frequency: every 27.3 days
  • Top authors: irvingswiftj (56.86%)electricstudio (25.49%)Electric Studio (21.57%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /17,768 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼9.72ms] Passed 4 tests

An overview of server-side resources used by Electric Studio Download Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.60 ▼10.52
Dashboard /wp-admin3.41 ▲0.0649.26 ▼11.88
Posts /wp-admin/edit.php3.52 ▲0.1748.24 ▼3.17
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.23 ▼13.30
Media Library /wp-admin/upload.php3.33 ▲0.1039.81 ▲4.92

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: 1 new table, 9 new options
New tables
wp_es_download_counter
New WordPress options
esdc_blocked_ips
can_compress_scripts
db_upgraded
widget_recent-posts
esdc_file_types
theysaidso_admin_options
widget_esdc_top_download_widget
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Electric Studio Download Counter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲16314.09 ▲0.1410.68 ▲8.4740.80 ▼4.14
Dashboard /wp-admin2,243 ▲614.94 ▼0.93102.77 ▼7.4140.99 ▼1.69
Posts /wp-admin/edit.php2,123 ▲342.26 ▲0.2534.30 ▼6.2735.34 ▲0.09
Add New Post /wp-admin/post-new.php1,543 ▲123.26 ▼0.06635.05 ▲18.5962.24 ▼0.69
Media Library /wp-admin/upload.php1,425 ▲374.27 ▲0.0798.04 ▼10.8142.39 ▼4.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_es_download_counter
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_esdc_top_download_widget
    • esdc_file_types
    • theysaidso_admin_options
    • esdc_blocked_ips
    • db_upgraded

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/electric-studio-download-counter/electric-studio-download-counter.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === electric-studio-download-counter === )
  • Screenshots: These screenshots require images: #1 (An example of the available download stats.), #2 (Specify which file types you want to track.)
Please take inspiration from this readme.txt

electric-studio-download-counter/electric-studio-download-counter.php Passed 13 tests

This is the main PHP file of "Electric Studio Download Counter" version 2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
32 characters long description:
Get Statistics on your Downloads

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 detected634 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP177192429
JavaScript25073
Sass14267
CSS20465

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity5.60
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.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
15 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_2e83ff_256x240.png4.10KB4.11KB0.00%
css/images/ui-icons_222222_256x240.png4.10KB4.11KB0.00%
css/images/ui-bg_flat_0_aaaaaa_40x100.png0.15KB0.08KB▼ 41.61%
css/images/ui-bg_glass_65_ffffff_1x400.png0.09KB0.10KB0.00%
css/images/ui-icons_454545_256x240.png4.10KB4.11KB0.00%