78% cga-plugin-helper

Code Review | CGA Plugin Helper

WordPress plugin CGA Plugin Helper scored78%from 54 tests.

About plugin

  • Plugin page: cga-plugin-helper
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 15, 2018
  • Latest release: Jun 28, 2018
  • Number of updates: 23
  • Update frequency: every 0.6 days
  • Top authors: cgalves (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /783 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.25ms] Passed 4 tests

A check of server-side resources used by CGA Plugin Helper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.72 ▲0.47
Dashboard /wp-admin3.38 ▲0.0858.32 ▲7.71
Posts /wp-admin/edit.php3.44 ▲0.0850.65 ▼3.22
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.82 ▼17.51
Media Library /wp-admin/upload.php3.31 ▲0.0839.26 ▼0.72
Whatever You Want /wp-admin/admin.php?page=plugin-searcher3.2732.09
Whatever You Want /wp-admin/admin.php?page=plugin-selector3.3635.68
Whatever You Want /wp-admin/admin.php?page=plugin-upgrade3.2834.61
Whatever You Want /wp-admin/admin.php?page=plugin-exporter3.2832.84
Whatever You Want /wp-admin/admin.php?page=plugin-done3.3029.82
Whatever You Want /wp-admin/admin.php?page=plugin-installer-sub3.2533.61
Whatever You Want /wp-admin/admin.php?page=plugin-activate3.2532.38
Whatever You Want /wp-admin/admin.php?page=plugin-installer-main3.2633.23

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for CGA Plugin Helper
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.37 ▲0.021.77 ▲0.1943.31 ▼1.88
Dashboard /wp-admin2,211 ▲345.57 ▼0.0983.07 ▼6.9036.45 ▼8.40
Posts /wp-admin/edit.php2,119 ▲192.00 ▼0.0236.08 ▼1.5036.17 ▼1.29
Add New Post /wp-admin/post-new.php1,539 ▲1123.00 ▲0.02620.78 ▼63.5460.94 ▲5.52
Media Library /wp-admin/upload.php1,419 ▲194.12 ▼0.06100.78 ▼15.4444.22 ▼3.91
Whatever You Want /wp-admin/admin.php?page=plugin-searcher8471.9921.7127.02
Whatever You Want /wp-admin/admin.php?page=plugin-selector1,6732.0137.0642.19
Whatever You Want /wp-admin/admin.php?page=plugin-upgrade2,1413.3731.9035.48
Whatever You Want /wp-admin/admin.php?page=plugin-exporter8461.9922.7729.47
Whatever You Want /wp-admin/admin.php?page=plugin-done7962.0222.4825.22
Whatever You Want /wp-admin/admin.php?page=plugin-installer-sub7732.0224.4822.34
Whatever You Want /wp-admin/admin.php?page=plugin-activate1,4752.3026.8131.91
Whatever You Want /wp-admin/admin.php?page=plugin-installer-main2,7973.7936.7937.63

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=plugin-installer-main
    • > Warning in wp-content/plugins/cga-plugin-helper/cgaph-activate-plugin.php+15
    Invalid argument supplied for foreach()

SRP 50% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cga-plugin-helper/plugin-helper.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires php: Version not formatted correctly
The official readme.txt is a good inspiration

cga-plugin-helper/plugin-helper.php 85% from 13 tests

"CGA Plugin Helper" version 1.3.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: Please rename the main PHP file in this plugin to the plugin slug ("cga-plugin-helper.php" instead of "plugin-helper.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin996 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP113157848
PO File14659148

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
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
No PNG files were detected