87% accesspress-custom-post-type

Code Review | AccessPress Custom Post Type

WordPress plugin AccessPress Custom Post Type scored 87% from 54 tests.

About plugin

  • Plugin page: accesspress-custo...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.8
  • WordPress version: 5.8.1
  • First release: Jul 28, 2015
  • Latest release: Dec 7, 2021
  • Number of updates: 22
  • Update frequency: every 105.8 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 12,732 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.38MB] [CPU: ▼179.95ms] Passed 4 tests

Analyzing server-side resources used by AccessPress Custom Post Type
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.22 ▲0.3826.65 ▲3.27
Dashboard /wp-admin3.46 ▲0.3933.66 ▼2.41
Posts /wp-admin/edit.php3.56 ▲0.4532.91 ▲1.38
Add New Post /wp-admin/post-new.php5.83 ▲0.3971.70 ▼715.32
Media Library /wp-admin/upload.php3.39 ▲0.3925.33 ▼3.43
All Testimonials /wp-admin/edit.php?post_type=testimonials3.4326.31
All Services /wp-admin/edit.php?post_type=services3.4325.07
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolios3.3924.30
All Price Tables /wp-admin/edit.php?post_type=price-table3.4327.90
All Products /wp-admin/edit.php?post_type=products3.4323.66
Add Price Table /wp-admin/post-new.php?post_type=price-table3.4732.37
Add New /wp-admin/post-new.php?post_type=team-members3.5246.30
Add New /wp-admin/post-new.php?post_type=clients3.5244.82
All Clients /wp-admin/edit.php?post_type=clients3.4327.26
All Portfolios /wp-admin/edit.php?post_type=portfolios3.4323.91

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by AccessPress Custom Post Type
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,954 ▲35316.02 ▼0.026.52 ▲0.9775.34 ▼2.78
Dashboard /wp-admin3,187 ▲2886.24 ▲0.15119.31 ▼11.39170.43 ▼8.49
Posts /wp-admin/edit.php2,997 ▲2573.28 ▲0.0466.61 ▼4.88140.22 ▼6.98
Add New Post /wp-admin/post-new.php2,051 ▼1,64821.28 ▲2.36393.52 ▼51.12162.75 ▲9.32
Media Library /wp-admin/upload.php2,009 ▲2605.46 ▼0.08138.95 ▼85.67183.91 ▼51.16
All Testimonials /wp-admin/edit.php?post_type=testimonials1,6783.2062.69114.62
All Services /wp-admin/edit.php?post_type=services1,6783.2162.71114.59
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolios2,0112.8458.76126.49
All Price Tables /wp-admin/edit.php?post_type=price-table1,6783.2064.11111.85
All Products /wp-admin/edit.php?post_type=products1,6753.2063.37112.14
Add Price Table /wp-admin/post-new.php?post_type=price-table5,0744.31108.36237.10
Add New /wp-admin/post-new.php?post_type=team-members3,23510.16192.20206.05
Add New /wp-admin/post-new.php?post_type=clients3,17510.00185.44205.50
All Clients /wp-admin/edit.php?post_type=clients1,6783.2060.05108.83
All Portfolios /wp-admin/edit.php?post_type=portfolios1,7023.2263.61115.17

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
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=price-table
    • > Notice in wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/price-metabox.php+257
    Undefined variable: table_icon

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 11× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/accesspress-custom-post-type/inc/frontend/shortcodes.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/service-metabox.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/save-settings.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/post-types.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/portfolio-metabox.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/testimonials-metabox.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/price-metabox.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/clients-metabox.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/products-metabox.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/team-member-metabox.php

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

accesspress-custom-post-type/accesspress-cpt.php 77% from 13 tests

The main file in "AccessPress Custom Post Type" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • 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
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("accesspress-custom-post-type.php" instead of "accesspress-cpt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected5,339 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions36100.00%
▷ Anonymous functions00.00%
▷ Global constants4100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/sc-icon.png1.30KB0.31KB▼ 76.19%