94% genesis-services-cpt

Code Review | Genesis Services CPT

WordPress plugin Genesis Services CPT scored 94% from 54 tests.

About plugin

  • Plugin page: genesis-services-cpt
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9.2
  • WordPress version: 5.8.1
  • First release: Oct 2, 2014
  • Latest release: Jan 12, 2015
  • Number of updates: 10
  • Update frequency: every 10.2 days
  • Top authors: James Roberts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 623 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Genesis Services CPT
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.69 ▲13.87
Dashboard /wp-admin3.07 ▲0.0245.61 ▼6.35
Posts /wp-admin/edit.php3.13 ▲0.0146.69 ▼8.17
Add New Post /wp-admin/post-new.php5.43 ▼0.0094.68 ▼555.69
Media Library /wp-admin/upload.php3.02 ▲0.0236.42 ▲0.12

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Genesis Services CPT
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲6616.17 ▲0.099.47 ▲0.3850.78 ▼3.32
Dashboard /wp-admin2,973 ▲425.88 ▼0.04144.39 ▼7.16118.40 ▲1.46
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0171.76 ▼1.3394.10 ▲2.01
Add New Post /wp-admin/post-new.php1,672 ▲15618.89 ▲0.07397.23 ▼3.80119.53 ▲7.35
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.04158.61 ▼22.46123.35 ▼37.03

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
Uninstaller ran successfully

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-services-cpt/services-cpt.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-services-cpt/single-service.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


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
These attributes need to be fixed:
  • Tags: Please add at least on tag
You can look at the official readme.txt

genesis-services-cpt/services-cpt.php 92% from 13 tests

This is the main PHP file of "Genesis Services CPT" version 1.0, 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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("genesis-services-cpt.php" instead of "services-cpt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin60 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin