78% add-post-type-instructions

Code Review | Add Post Type Instructions

WordPress plugin Add Post Type Instructions scored78%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: 6.3.1
  • 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,889 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Add Post Type Instructions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.58 ▲0.50
Dashboard /wp-admin3.59 ▲0.2949.15 ▼0.52
Posts /wp-admin/edit.php3.71 ▲0.3547.41 ▲0.08
Add New Post /wp-admin/post-new.php6.17 ▲0.2894.57 ▲4.74
Media Library /wp-admin/upload.php3.52 ▲0.2838.87 ▲1.08
Post Type Instructions /wp-admin/options-general.php?page=apti3.5437.43

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 11 new options
New WordPress options
apti_wp_block
apti_page
can_compress_scripts
apti_wp_navigation
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
apti-display-activation-message
apti_post
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Post Type Instructions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.22 ▼1.161.60 ▼0.6343.84 ▲0.81
Dashboard /wp-admin2,212 ▲246.01 ▲1.13101.44 ▼15.8540.30 ▼4.19
Posts /wp-admin/edit.php2,097 ▲82.00 ▼0.1446.64 ▲7.7537.11 ▲0.65
Add New Post /wp-admin/post-new.php1,531 ▲1218.16 ▼5.10586.88 ▼16.4552.61 ▼5.20
Media Library /wp-admin/upload.php1,394 ▲34.24 ▼0.0894.30 ▼3.7842.19 ▲0.36
Post Type Instructions /wp-admin/options-general.php?page=apti1,7966.67137.8963.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/add-post-type-instructions/admin/views/admin.php:19
    • > 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

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > 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=6.3.1 - 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 uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • 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 main PHP file in "Add Post Type Instructions" ver. 2.1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please 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 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,363 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP74214281,336
CSS13027

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin