10% mcb-stats

Code Review | MCB - Stats

WordPress plugin MCB - Stats scored10%from 54 tests.

About plugin

  • Plugin page: mcb-stats
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 11, 2017
  • Latest release: May 12, 2017
  • Number of updates: 21
  • Update frequency: every 0.1 days
  • Top authors: mariusromanus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /665 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/mcb-stats/mcb-stats.php+13
    date_default_timezone_set(): Timezone ID '' is invalid

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.75ms] Passed 4 tests

A check of server-side resources used by MCB - Stats
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.98 ▼32.58
Dashboard /wp-admin2.05 ▼1.266.15 ▼46.07
Posts /wp-admin/edit.php2.05 ▼1.315.66 ▼39.61
Add New Post /wp-admin/post-new.php2.05 ▼3.845.35 ▼92.73
Media Library /wp-admin/upload.php2.05 ▼1.186.24 ▼32.47

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 154 new files
Database: 1 new table, 6 new options
New tables
wp_mcb_stats
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for MCB - Stats
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17613.93 ▼0.376.06 ▲4.3139.42 ▼2.78
Dashboard /wp-admin2,222 ▲314.82 ▼0.05103.59 ▼6.9041.67 ▼1.91
Posts /wp-admin/edit.php2,102 ▲162.05 ▲0.0534.42 ▼3.1433.63 ▲0.54
Add New Post /wp-admin/post-new.php1,533 ▼023.33 ▲0.01668.34 ▼13.0152.71 ▼2.50
Media Library /wp-admin/upload.php1,404 ▲164.22 ▼0.0395.39 ▼18.0045.00 ▼2.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/mcb-stats/mcb-stats.php+13
    date_default_timezone_set(): Timezone ID '' is invalid
  • Zombie tables were found after uninstall: 1 table
    • wp_mcb_stats
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Congratulations! This plugin passed the SRP test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

mcb-stats/mcb-stats.php 92% from 13 tests

"MCB - Stats" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 160 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin149,553 lines of code in 120 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5717,25243,370143,554
CSS601732795,345
PHP16014558
Sass218296

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
12 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
DataTables/DataTables-1.10.13/images/sort_asc.png0.16KB0.25KB0.00%
DataTables/DataTables-1.10.13/images/sort_asc_disabled.png0.14KB0.25KB0.00%
css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%