84% statistinator

Code Review | Statistinator

WordPress plugin Statistinator scored 84% from 54 tests.

About plugin

  • Plugin page: statistinator
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5.3
  • WordPress version: 6.3.1
  • First release: Jun 7, 2016
  • Latest release: Aug 12, 2016
  • Number of updates: 23
  • Update frequency: every 2.9 days
  • Top authors: filkaris (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 990 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

An overview of server-side resources used by Statistinator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.52 ▼7.21
Dashboard /wp-admin3.40 ▲0.1045.79 ▼2.14
Posts /wp-admin/edit.php3.52 ▲0.1644.16 ▼4.67
Add New Post /wp-admin/post-new.php5.98 ▲0.1086.44 ▼9.57
Media Library /wp-admin/upload.php3.32 ▲0.1036.78 ▲5.18
Statistinator /wp-admin/options-general.php?page=statistinator3.2930.01

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
statistinator_status
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Statistinator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲12113.26 ▼1.494.59 ▲2.7043.24 ▲0.16
Dashboard /wp-admin2,259 ▲745.83 ▼0.0698.82 ▼8.5341.39 ▼0.53
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0332.73 ▼0.7333.36 ▼2.85
Add New Post /wp-admin/post-new.php1,539 ▼323.43 ▲4.92654.45 ▲14.3552.42 ▼2.40
Media Library /wp-admin/upload.php1,392 ▲74.20 ▼0.0395.91 ▼5.4442.26 ▼0.33
Statistinator /wp-admin/options-general.php?page=statistinator8261.9324.7933.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • statistinator_status
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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 plugin_dir_path() in wp-content/plugins/statistinator/statistinator.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

statistinator/statistinator.php Passed 13 tests

The main PHP script in "Statistinator" version 1.2.2 is automatically included on every request by WordPress
41 characters long description:
Your social media analytics in one place.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin7,952 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,4447617,253
PHP79868583
CSS21211116

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.50
▷ Minimum class complexity4.00
▷ Maximum class complexity35.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods30
▷ Static methods1033.33%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/youtube.png6.52KB3.90KB▼ 40.19%
images/mailchimp.png10.80KB4.12KB▼ 61.80%
images/google.png13.57KB9.59KB▼ 29.35%
images/facebook.png1.41KB1.21KB▼ 14.02%
images/twitter.png3.90KB2.27KB▼ 41.68%