83% custom-post-type-add-on-for-gamipress

Code Review | Custom Post Type Add-On for GamiPress

WordPress plugin Custom Post Type Add-On for GamiPress scored 83% from 54 tests.

About plugin

  • Plugin page: custom-post-type-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 6, 2020
  • Latest release: Nov 6, 2020
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: konnektiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 476 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼6.95ms] Passed 4 tests

An overview of server-side resources used by Custom Post Type Add-On for GamiPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.54 ▼7.87
Dashboard /wp-admin3.31 ▲0.0047.88 ▲2.05
Posts /wp-admin/edit.php3.36 ▲0.0049.27 ▼1.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.37 ▼12.14
Media Library /wp-admin/upload.php3.23 ▲0.0033.35 ▼6.14

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Custom Post Type Add-On for GamiPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.69 ▼0.681.67 ▲0.1039.57 ▼12.45
Dashboard /wp-admin2,206 ▲245.86 ▲0.96106.57 ▲0.9838.45 ▼8.82
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0041.05 ▲1.0634.67 ▲0.62
Add New Post /wp-admin/post-new.php1,536 ▲2223.06 ▲5.49640.97 ▼49.4855.42 ▲2.16
Media Library /wp-admin/upload.php1,382 ▼94.18 ▼0.0597.17 ▼4.8041.56 ▼1.32

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/custom-post-type-add-on-for-gamipress/gamipress-cpt.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

custom-post-type-add-on-for-gamipress/gamipress-cpt.php 85% from 13 tests

Analyzing the main PHP file in "Custom Post Type Add-On for GamiPress" version 1.0.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-post-type-add-on-for-gamipress.php" instead of "gamipress-cpt.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin105 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24410695
JSON10010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin