88% cocohub

Code Review | CoCoHub

WordPress plugin CoCoHub scored 88% from 54 tests.

About plugin

  • Plugin page: cocohub
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Mar 12, 2020
  • Latest release: Oct 6, 2021
  • Number of updates: 22
  • Update frequency: every 26.1 days
  • Top authors: cbuskilla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 955 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼141.65ms] Passed 4 tests

Server-side resources used by CoCoHub
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1838.17 ▲15.72
Dashboard /wp-admin3.15 ▲0.0956.86 ▲10.27
Posts /wp-admin/edit.php3.23 ▲0.1248.77 ▲8.93
Add New Post /wp-admin/post-new.php5.50 ▲0.0795.34 ▼586.12
Media Library /wp-admin/upload.php3.09 ▲0.0936.39 ▲0.32
CoCoHub Bot /wp-admin/options-general.php?page=cocohub-bot-settings3.0631.14

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for CoCoHub
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,721 ▲12516.64 ▲1.0724.87 ▲13.4848.82 ▼4.94
Dashboard /wp-admin2,972 ▲415.92 ▼0.18136.59 ▼10.94116.89 ▼4.12
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0179.11 ▲4.5896.24 ▼0.66
Add New Post /wp-admin/post-new.php1,686 ▲318.80 ▼0.01396.49 ▲12.17115.19 ▼0.61
Media Library /wp-admin/upload.php1,812 ▲55.02 ▲0.00157.48 ▼13.44121.97 ▼3.43
CoCoHub Bot /wp-admin/options-general.php?page=cocohub-bot-settings1,1892.0962.9090.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cocohub/includes/enqueue.php
    • > /wp-content/plugins/cocohub/cocohub.php
    • > /wp-content/plugins/cocohub/includes/shortcode.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cocohub/includes/CoCoBotSettings.php:374

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in cocohub/assets to your readme.txt
You can take inspiration from this readme.txt

cocohub/cocohub.php 92% from 13 tests

This is the main PHP file of "CoCoHub" version 1.3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 212 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 plugin410 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions120.00%
▷ Anonymous functions480.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings