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.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.7
  • WordPress version: 5.8.1
  • First release: Jul 28, 2015
  • Latest release: Apr 1, 2021
  • Number of updates: 21
  • Update frequency: every 98.9 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 12,378 total downloads

Benchmarks

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.40MB] [CPU: ▼136.39ms] 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.21 ▲0.4849.70 ▲27.30
Dashboard /wp-admin3.45 ▲0.3946.29 ▲2.33
Posts /wp-admin/edit.php3.55 ▲0.4453.09 ▲2.21
Add New Post /wp-admin/post-new.php5.82 ▲0.38102.48 ▼553.76
Media Library /wp-admin/upload.php3.38 ▲0.3834.70 ▲3.67
All Price Tables /wp-admin/edit.php?post_type=price-table3.4336.98
Add New /wp-admin/post-new.php?post_type=testimonials3.5149.23
All Portfolios /wp-admin/edit.php?post_type=portfolios3.4335.25
Add New /wp-admin/post-new.php?post_type=clients3.5150.68
Add New /wp-admin/post-new.php?post_type=team-members3.5151.57
All Products /wp-admin/edit.php?post_type=products3.4337.19
All Team Members /wp-admin/edit.php?post_type=team-members3.4339.54
Add New /wp-admin/post-new.php?post_type=portfolios3.5252.74
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolios3.3841.29
Add Price Table /wp-admin/post-new.php?post_type=price-table3.4649.24

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,991 ▲39515.90 ▲0.339.49 ▼1.0748.20 ▼4.31
Dashboard /wp-admin3,229 ▲2986.18 ▲0.05156.70 ▲2.23121.88 ▲4.47
Posts /wp-admin/edit.php2,995 ▲2592.74 ▲0.0673.00 ▲2.6394.41 ▲2.41
Add New Post /wp-admin/post-new.php1,853 ▲17018.77 ▲1.22387.27 ▲17.67113.14 ▼1.32
Media Library /wp-admin/upload.php2,063 ▲2564.96 ▼0.06172.92 ▲11.43124.53 ▼7.94
All Price Tables /wp-admin/edit.php?post_type=price-table1,6622.6871.0879.20
Add New /wp-admin/post-new.php?post_type=testimonials3,1778.85251.62151.33
All Portfolios /wp-admin/edit.php?post_type=portfolios1,6862.6774.9879.72
Add New /wp-admin/post-new.php?post_type=clients3,1658.75226.14130.34
Add New /wp-admin/post-new.php?post_type=team-members3,2268.18220.83146.24
All Products /wp-admin/edit.php?post_type=products1,6622.6669.2981.60
All Team Members /wp-admin/edit.php?post_type=team-members1,6622.6674.5176.09
Add New /wp-admin/post-new.php?post_type=portfolios3,3118.26220.23139.38
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolios1,9952.5970.0991.30
Add Price Table /wp-admin/post-new.php?post_type=price-table5,0593.56121.09182.33

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/backend/metaboxes/portfolio-metabox.php
    • > /wp-content/plugins/accesspress-custom-post-type/accesspress-cpt.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/post-types.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/save-settings.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/clients-metabox.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/frontend/shortcodes.php
    • > /wp-content/plugins/accesspress-custom-post-type/inc/backend/metaboxes/team-member-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/products-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

Optimizations

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.8 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,325 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS344532,880
PHP121421541,702
SVG100685
JavaScript14458

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.52
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants4
▷ 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%