84% post-type-requirements-checklist

Code Review | Requirements Checklist

WordPress plugin Requirements Checklist scored 84% from 54 tests.

About plugin

  • Plugin page: post-type-require...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.2
  • WordPress version: 6.3.1
  • First release: Jan 24, 2015
  • Latest release: Apr 22, 2015
  • Number of updates: 42
  • Update frequency: every 2.1 days
  • Top authors: dauidus (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

900+ active / 7,077 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.20ms] Passed 4 tests

This is a short check of server-side resources used by Requirements Checklist
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.57 ▼5.29
Dashboard /wp-admin3.34 ▲0.0451.22 ▼1.50
Posts /wp-admin/edit.php3.40 ▲0.0452.92 ▲2.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0498.71 ▲5.48
Media Library /wp-admin/upload.php3.27 ▲0.0438.44 ▲3.89
Requirements Checklist /wp-admin/options-general.php?page=aptrc3.2634.81

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
aptrc_post
db_upgraded
aptrc-display-activation-message
can_compress_scripts
aptrc_page
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Requirements Checklist
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲1713.25 ▼0.081.99 ▲0.2070.34 ▲23.69
Dashboard /wp-admin2,215 ▲94.84 ▼0.0198.17 ▼11.3640.51 ▼3.29
Posts /wp-admin/edit.php2,097 ▲82.05 ▲0.0242.04 ▲8.3537.55 ▲1.14
Add New Post /wp-admin/post-new.php1,522 ▲823.39 ▲5.84611.71 ▼98.5751.17 ▼3.62
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.0696.67 ▼4.5341.18 ▼0.11
Requirements Checklist /wp-admin/options-general.php?page=aptrc9792.1828.1438.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/post-type-requirements-checklist/admin/views/admin.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'post_type_requirements_checklist' not found in wp-content/plugins/post-type-requirements-checklist/admin/includes/settings.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

post-type-requirements-checklist/post-type-requirements-checklist.php 92% from 13 tests

The primary PHP file in "Requirements Checklist" version 2.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,822 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP74375381,429
PO File269168225
CSS2152168

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity48.67
▷ Minimum class complexity16.00
▷ Maximum class complexity67.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods71
▷ Static methods912.68%
▷ Public methods6490.14%
▷ Protected methods00.00%
▷ Private methods79.86%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/yes.png0.57KB0.52KB▼ 8.42%