10% seraphinite-downloads-stats

Code Review | Seraphinite Downloads Statistics

WordPress plugin Seraphinite Downloads Statistics scored10%from 54 tests.

About plugin

  • Plugin page: seraphinite-downl...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Mar 23, 2018
  • Latest release: Sep 14, 2022
  • Number of updates: 10
  • Update frequency: every 166.3 days
  • Top authors: seraphinitesoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,100 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/seraphinite-downloads-stats/Cmn/Gen.php+744
    fopen(wp-content/seraph_dlstat/cfg.dat): failed to open stream: No such file or directory

Server metrics [RAM: ▲2.00MB] [CPU: ▲5.05ms] Passed 4 tests

Analyzing server-side resources used by Seraphinite Downloads Statistics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.35 ▲1.8949.74 ▲10.02
Dashboard /wp-admin5.39 ▲2.0958.90 ▲11.69
Posts /wp-admin/edit.php5.44 ▲2.0962.66 ▲14.31
Add New Post /wp-admin/post-new.php7.91 ▲2.0394.61 ▼15.83
Media Library /wp-admin/upload.php5.25 ▲2.0250.25 ▲16.01
Downloads Statistics /wp-admin/options-general.php?page=seraph_dlstat_settings5.2743.43

Server storage [IO: ▲0.40MB] [DB: ▲0.01MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • You have illegally modified 4 files (0.16KB) outside of "wp-content/plugins/seraphinite-downloads-stats/" and "wp-content/uploads/"
    • (new file) wp-content/seraph_dlstat/.htaccess
    • (new file) wp-content/seraph_dlstat/cfg.dat
    • (new file) wp-content/seraph_dlstat/q.dat.lst
    • (new file) wp-content/seraph_dlstat/at.dat
Filesystem: 29 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
seraph_dlstat_State
widget_recent-comments
widget_theysaidso_widget
seraph_dlstat_Sett
can_compress_scripts
seraph_dlstat_RmtCfg
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Seraphinite Downloads Statistics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.72 ▲0.441.84 ▲0.1539.79 ▼1.86
Dashboard /wp-admin2,214 ▲375.82 ▲0.1895.37 ▲7.6442.26 ▲2.17
Posts /wp-admin/edit.php2,126 ▲232.25 ▲0.2439.08 ▲1.3736.62 ▲3.17
Add New Post /wp-admin/post-new.php1,557 ▲1923.33 ▲5.09659.60 ▲38.2534.16 ▼27.86
Media Library /wp-admin/upload.php1,419 ▲224.34 ▲0.16100.21 ▲1.2942.93 ▼1.69
Downloads Statistics /wp-admin/options-general.php?page=seraph_dlstat_settings1,6182.5950.9063.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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: 9 options
    • db_upgraded
    • widget_theysaidso_widget
    • seraph_dlstat_Sett
    • seraph_dlstat_RmtCfg
    • theysaidso_admin_options
    • widget_recent-posts
    • seraph_dlstat_State
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: download monitor, statistic, directory, download, analytics

seraphinite-downloads-stats/seraphinite-downloads-stats.php Passed 13 tests

The primary PHP file in "Seraphinite Downloads Statistics" version 1.3.1 is used by WordPress to initiate all plugin functionality
40 characters long description:
Measure direct downloads from your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin7,789 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP112,1572657,657
JavaScript600129
JSON2002
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity60.40
▷ Minimum class complexity1.00
▷ Maximum class complexity267.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods493
▷ Static methods48097.36%
▷ Public methods43788.64%
▷ Protected methods20.41%
▷ Private methods5410.95%
Functions94
▷ Named functions4143.62%
▷ Anonymous functions5356.38%
Constants101
▷ Global constants21.98%
▷ Class constants9998.02%
▷ Public constants99100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Images/VendorLogo.png1.47KB1.45KB▼ 1.40%
Images/ProductLogo.png2.45KB1.88KB▼ 23.12%