88% add-post-type-instructions

Code Review | Add Post Type Instructions

WordPress plugin Add Post Type Instructions scored 88% from 54 tests.

About plugin

  • Plugin page: add-post-type-ins...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 5.9.2
  • First release: Dec 9, 2014
  • Latest release: Apr 25, 2015
  • Number of updates: 49
  • Update frequency: every 7.5 days
  • Top authors: dauidus (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 2,470 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼296.57ms] Passed 4 tests

An overview of server-side resources used by Add Post Type Instructions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0454.60 ▲7.17
Dashboard /wp-admin3.70 ▲0.2933.73 ▼0.14
Posts /wp-admin/edit.php3.93 ▲0.2937.20 ▼0.43
Add New Post /wp-admin/post-new.php7.23 ▲0.2693.05 ▼1,185.26
Media Library /wp-admin/upload.php3.64 ▲0.3425.84 ▼0.43
Post Type Instructions /wp-admin/options-general.php?page=apti3.6729.16

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 5 new options
New WordPress options
apti_post
apti_page
apti_wp_navigation
apti-display-activation-message
apti_wp_block

Browser metrics Passed 4 tests

Checking browser requirements for Add Post Type Instructions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,770 ▲2815.88 ▲0.267.01 ▲1.142.36 ▲0.31
Dashboard /wp-admin2,899 ▲386.13 ▼0.03117.68 ▼18.44153.87 ▼11.82
Posts /wp-admin/edit.php2,697 ▲63.25 ▲0.0062.30 ▼4.79143.14 ▼3.06
Add New Post /wp-admin/post-new.php1,717 ▲3120.73 ▲2.54430.30 ▼7.81154.08 ▼4.08
Media Library /wp-admin/upload.php1,702 ▲45.47 ▼0.07157.35 ▲5.56199.16 ▲8.13
Post Type Instructions /wp-admin/options-general.php?page=apti2,2818.63155.74189.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'add_post_type_instructions' not found in wp-content/plugins/add-post-type-instructions/admin/includes/settings.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/add-post-type-instructions/admin/views/admin.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=apti
    • > Network (severe)
    wp-content/plugins/add-post-type-instructions/admin/css/apti-settings.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

add-post-type-instructions/add-post-type-instructions.php 92% from 13 tests

The entry point to "Add Post Type Instructions" version 2.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 487 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,363 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP74214281,336
CSS13027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity48.33
▷ Minimum class complexity16.00
▷ Maximum class complexity77.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods75
▷ Static methods912.00%
▷ Public methods6890.67%
▷ Protected methods00.00%
▷ Private methods79.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin