10% zipfstats

Code Review | Zipfstats

WordPress plugin Zipfstats scored10%from 54 tests.

About plugin

  • Plugin page: zipfstats
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.7
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Jan 3, 2017
  • Number of updates: 12
  • Update frequency: every 75.2 days
  • Top authors: James Luberda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,077 total downloads

Benchmarks

Plugin footprint 40% 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 validation failed for this plugin
    • > Deprecated in wp-content/plugins/zipfstats/jbl-zipfstats.php+60
    Methods with the same name as their class will not be constructors in a future version of PHP; zipfstats_widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼54.31ms] Passed 4 tests

Analyzing server-side resources used by Zipfstats
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.69 ▼42.28
Dashboard /wp-admin2.10 ▼1.206.65 ▼42.23
Posts /wp-admin/edit.php2.10 ▼1.265.91 ▼40.09
Add New Post /wp-admin/post-new.php2.10 ▼3.795.03 ▼92.64
Media Library /wp-admin/upload.php2.10 ▼1.135.34 ▼27.39

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_zipfstats_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Zipfstats: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.40 ▲0.221.71 ▼0.5241.32 ▼6.43
Dashboard /wp-admin2,209 ▲214.80 ▼1.07101.68 ▼15.1340.88 ▼1.21
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0434.15 ▼1.8733.22 ▼0.15
Add New Post /wp-admin/post-new.php1,514 ▼2017.74 ▼5.34623.66 ▼57.4363.54 ▲3.03
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.1196.86 ▼9.9043.11 ▼1.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/zipfstats/jbl-zipfstats.php+60
    Methods with the same name as their class will not be constructors in a future version of PHP; zipfstats_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/zipfstats/jbl-zipfstats.php

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: word count, writing, zipf widget, linguistics, posts...

zipfstats/jbl-zipfstats.php 92% from 13 tests

The principal PHP file in "Zipfstats" v. 1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("zipfstats.php" instead of "jbl-zipfstats.php")

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
No dangerous file extensions were detected1,286 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61881631,102
PHP24440163
CSS22121

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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 images were found in this plugin