89% multi-counter

Code Review | Multi Counter

WordPress plugin Multi Counter scored89%from 54 tests.

About plugin

  • Plugin page: multi-counter
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Dec 24, 2016
  • Latest release: Feb 7, 2017
  • Number of updates: 15
  • Update frequency: every 2.7 days
  • Top authors: cr1000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,280 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.51ms] Passed 4 tests

Server-side resources used by Multi Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.73 ▼7.10
Dashboard /wp-admin3.32 ▲0.0249.07 ▼0.00
Posts /wp-admin/edit.php3.37 ▲0.0145.52 ▼5.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.05 ▼5.89
Media Library /wp-admin/upload.php3.24 ▲0.0139.78 ▲3.86

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Multi Counter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15914.40 ▲0.141.84 ▲0.0644.39 ▲2.35
Dashboard /wp-admin2,298 ▲1185.73 ▲0.0599.92 ▲8.9686.51 ▲45.01
Posts /wp-admin/edit.php2,112 ▲122.01 ▲0.0237.28 ▼2.2135.12 ▼3.13
Add New Post /wp-admin/post-new.php1,538 ▲1023.06 ▼0.08662.45 ▼10.1054.45 ▼5.42
Media Library /wp-admin/upload.php1,412 ▲184.22 ▲0.02110.93 ▲7.8247.85 ▲2.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt might help

multi-counter/multicounter.php 92% from 13 tests

The principal PHP file in "Multi Counter" v. 1.2.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("multi-counter.php" instead of "multicounter.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
Good job! No executable or dangerous file extensions detected1,355 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP133101071,216
JavaScript220196
CSS16043

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.70
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods93
▷ Static methods1617.20%
▷ Public methods7378.49%
▷ Protected methods00.00%
▷ Private methods2021.51%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected