94% advanced-custom-post-types

Code Review | Advanced Custom Post Types

WordPress plugin Advanced Custom Post Types scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-p...
  • Plugin version: 0.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.6.1
  • WordPress version: 5.9.2
  • First release: Jul 3, 2016
  • Latest release: Mar 18, 2017
  • Number of updates: 21
  • Update frequency: every 12.6 days
  • Top authors: iambriansreed (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active / 4,202 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼292.65ms] Passed 4 tests

Analyzing server-side resources used by Advanced Custom Post Types
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0760.86 ▲9.73
Dashboard /wp-admin3.64 ▲0.2336.08 ▲3.50
Posts /wp-admin/edit.php3.86 ▲0.2240.05 ▲1.06
Add New Post /wp-admin/post-new.php7.10 ▲0.1398.14 ▼1,176.42
Media Library /wp-admin/upload.php3.52 ▲0.2326.52 ▲1.25
Content Types /wp-admin/edit.php?post_type=acpt_content_type3.6225.99
Add New /wp-admin/post-new.php?post_type=acpt_content_type3.8747.77

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Custom Post Types: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲7815.92 ▲0.316.05 ▲0.363.05 ▲0.78
Dashboard /wp-admin2,930 ▲696.09 ▼0.20117.61 ▼14.63155.38 ▼1.59
Posts /wp-admin/edit.php2,729 ▲353.24 ▼0.0064.79 ▲2.23133.16 ▼7.44
Add New Post /wp-admin/post-new.php1,689 ▼7119.66 ▼2.13440.86 ▲4.95154.98 ▼9.51
Media Library /wp-admin/upload.php1,735 ▲345.52 ▼0.03138.44 ▼1.96185.19 ▲2.45
Content Types /wp-admin/edit.php?post_type=acpt_content_type1,4023.1660.06111.11
Add New /wp-admin/post-new.php?post_type=acpt_content_type4,8194.74124.67147.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_Custom_Post_Types\\Load_Base' not found in wp-content/plugins/advanced-custom-post-types/class-load-main.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_Custom_Post_Types\\Load_Base' not found in wp-content/plugins/advanced-custom-post-types/admin/class-load.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can look at the official readme.txt

advanced-custom-post-types/acpt.php 92% from 13 tests

The main PHP file in "Advanced Custom Post Types" ver. 0.5.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-custom-post-types.php" instead of "acpt.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
Good job! No executable or dangerous file extensions detected4,089 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity16.44
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
▷ Static methods1216.90%
▷ Public methods4969.01%
▷ Protected methods00.00%
▷ Private methods2230.99%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin