74% tidyclub

Code Review | TidyClub

WordPress plugin TidyClub scored74%from 54 tests.

About plugin

  • Plugin page: tidyclub
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6
  • WordPress version: 6.3.1
  • First release: Oct 23, 2013
  • Latest release: Oct 25, 2013
  • Number of updates: 9
  • Update frequency: every 23.0 days
  • Top authors: Nuanced Media (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /788 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by TidyClub
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.21 ▲3.12
Dashboard /wp-admin3.32 ▲0.0249.86 ▼5.40
Posts /wp-admin/edit.php3.37 ▲0.0152.00 ▲5.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.57 ▲1.71
Media Library /wp-admin/upload.php3.24 ▲0.0140.13 ▲7.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: 2 new tables, 7 new options
New tables
wp_tidyclub_events
wp_nmcron
New WordPress options
tc_version
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for TidyClub
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.33 ▼1.041.90 ▲0.2837.51 ▼11.75
Dashboard /wp-admin2,227 ▲424.86 ▼0.10107.64 ▼7.2041.22 ▼5.04
Posts /wp-admin/edit.php2,110 ▲212.00 ▲0.0040.10 ▲3.9235.40 ▼0.62
Add New Post /wp-admin/post-new.php1,552 ▲1918.27 ▼4.80612.42 ▼68.7658.06 ▲3.18
Media Library /wp-admin/upload.php1,403 ▲124.22 ▼0.0893.75 ▼8.6342.02 ▼5.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_nmcron
    • wp_tidyclub_events
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • tc_version
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/tidyclub/nmCron.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tidyclub/tcAdminMenu.php:332
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tidyclub/tcAdminMenu.php:332
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tidyclub/nmCron.php:28

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: tidyclub, club management

tidyclub/TidyClub.php 85% from 13 tests

"TidyClub" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tidyclub.php" instead of "TidyClub.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin831 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP399120722
Sass310787
CSS25022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity19.00
▷ Minimum class complexity4.00
▷ Maximum class complexity32.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/NM_logo_mini.png2.37KB1.61KB▼ 31.96%
images/NM_logo_banner.png9.08KB4.88KB▼ 46.25%
images/tidyclub_logo.png15.43KB5.46KB▼ 64.62%