88% cocohub

Code Review | CoCoHub

WordPress plugin CoCoHub scored 88% from 54 tests.

About plugin

  • Plugin page: cocohub
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Mar 12, 2020
  • Latest release: Feb 3, 2022
  • Number of updates: 23
  • Update frequency: every 30.2 days
  • Top authors: cbuskilla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,092 total downloads

Benchmarks

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.08MB] [CPU: ▼147.61ms] Passed 4 tests

Server-side resources used by CoCoHub
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0727.24 ▲3.02
Dashboard /wp-admin3.14 ▲0.0837.99 ▼4.80
Posts /wp-admin/edit.php3.23 ▲0.1232.79 ▼3.24
Add New Post /wp-admin/post-new.php5.51 ▲0.0773.88 ▼578.70
Media Library /wp-admin/upload.php3.09 ▲0.0923.68 ▼3.69
CoCoHub Bot /wp-admin/options-general.php?page=cocohub-bot-settings3.0622.43

Server storage [IO: ▲1.36MB] [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: 16 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,730 ▲12916.70 ▲1.0919.79 ▲14.7176.73 ▲3.79
Dashboard /wp-admin2,934 ▲386.10 ▼0.06121.31 ▼7.27163.61 ▼18.15
Posts /wp-admin/edit.php2,742 ▲23.24 ▲0.0163.68 ▼0.81139.68 ▲2.50
Add New Post /wp-admin/post-new.php3,734 ▼7318.50 ▼0.13433.13 ▼9.16156.81 ▼7.72
Media Library /wp-admin/upload.php1,760 ▲85.49 ▲0.04139.75 ▼17.83188.50 ▲2.35
CoCoHub Bot /wp-admin/options-general.php?page=cocohub-bot-settings1,2082.3653.37132.61

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/includes/shortcode.php
    • > /wp-content/plugins/cocohub/cocohub.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

Optimizations

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.3, 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 plugin399 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP48331362
JSON20035
HTML1001
JavaScript1021

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.41
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants3
▷ 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
build/logo192.png5.22KB5.57KB0.00%
build/logo512.png9.44KB10.35KB0.00%