89% post-types-unlimited

Code Review | Post Types Unlimited

WordPress plugin Post Types Unlimited scored89%from 54 tests.

About plugin

  • Plugin page: post-types-unlimited
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Mar 19, 2019
  • Latest release: Aug 31, 2023
  • Number of updates: 26
  • Update frequency: every 62.5 days
  • Top authors: WPExplorer (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10,000+ active /51,079 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼2.29ms] Passed 4 tests

A check of server-side resources used by Post Types Unlimited
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4043.27 ▲2.12
Dashboard /wp-admin3.71 ▲0.4153.80 ▼13.72
Posts /wp-admin/edit.php3.83 ▲0.4751.43 ▲0.92
Add New Post /wp-admin/post-new.php6.29 ▲0.4195.49 ▲1.54
Media Library /wp-admin/upload.php3.64 ▲0.4143.59 ▲4.59
Post Types /wp-admin/edit.php?post_type=ptu3.6838.85
Taxonomies /wp-admin/edit.php?post_type=ptu_tax3.6838.59

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Post Types Unlimited
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.34 ▲0.061.66 ▼0.0745.03 ▲2.09
Dashboard /wp-admin2,223 ▲465.63 ▲0.1095.05 ▼5.9543.31 ▲1.52
Posts /wp-admin/edit.php2,128 ▲282.01 ▼0.0237.40 ▼3.8932.88 ▼6.69
Add New Post /wp-admin/post-new.php1,554 ▲2623.06 ▲0.05666.73 ▼19.7869.36 ▲3.96
Media Library /wp-admin/upload.php1,428 ▲254.08 ▼0.14112.54 ▲1.7247.61 ▲1.49
Post Types /wp-admin/edit.php?post_type=ptu1,1041.9530.4432.20
Taxonomies /wp-admin/edit.php?post_type=ptu_tax1,0991.9045.0733.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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: The official readme.txt is a good inspiration

post-types-unlimited/post-types-unlimited.php 92% from 13 tests

The primary PHP file in "Post Types Unlimited" version 1.2.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.2.0" instead of "5.7")

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 plugin2,323 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP73085161,919
Sass1490247
JavaScript12410140
JSON10016
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity27.17
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods50
▷ Static methods36.00%
▷ Public methods3468.00%
▷ Protected methods1632.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.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
There were not PNG files found in your plugin