78% ultimate-post-types

Code Review | Ultimate Post Types

WordPress plugin Ultimate Post Types scored 78% from 54 tests.

About plugin

  • Plugin page: ultimate-post-types
  • Plugin version: 3.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.5
  • WordPress version: 6.3.1
  • First release: Sep 3, 2014
  • Latest release: Apr 12, 2018
  • Number of updates: 13
  • Update frequency: every 101.3 days
  • Top authors: RadoGeorgiev (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active / 3,076 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.33ms] Passed 4 tests

Server-side resources used by Ultimate Post Types
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.58 ▼8.82
Dashboard /wp-admin3.33 ▲0.0343.34 ▼2.85
Posts /wp-admin/edit.php3.38 ▲0.0249.28 ▼1.86
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.51 ▼11.78
Media Library /wp-admin/upload.php3.25 ▲0.0237.86 ▲3.47

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Ultimate Post Types: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.30 ▼1.091.65 ▼0.1938.57 ▼10.95
Dashboard /wp-admin2,214 ▲264.86 ▼0.02111.39 ▼0.8343.98 ▼0.60
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0439.03 ▼2.5032.45 ▼4.22
Add New Post /wp-admin/post-new.php1,541 ▲2723.28 ▲5.55657.01 ▲25.2248.98 ▼1.25
Media Library /wp-admin/upload.php1,390 ▲24.23 ▼0.02100.85 ▲3.8243.38 ▲0.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ultimate-post-types/templates/post-types/post-type-php-export.php
    • > /wp-content/plugins/ultimate-post-types/templates/post-types/taxonomy-php-export.php
  • 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: function_name in wp-content/plugins/ultimate-post-types/templates/post-types/taxonomy-php-export.php on line 2
    • > PHP Notice
      Undefined variable: function_name in wp-content/plugins/ultimate-post-types/templates/post-types/taxonomy-php-export.php on line 1
    • > PHP Notice
      Undefined variable: function_name in wp-content/plugins/ultimate-post-types/templates/post-types/post-type-php-export.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Fields\\Post_Types\\Controller' not found in wp-content/plugins/ultimate-post-types/classes/Controller/Taxonomy.php:16
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ultimate-post-types/templates/post-types/taxonomy-php-export.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-post-types/ultimate-post-types.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Ultimate_Fields\\UI\\Settings\\Screen' not found in wp-content/plugins/ultimate-post-types/classes/Migration_Page.php:13
    • > PHP Notice
      Undefined variable: function_name in wp-content/plugins/ultimate-post-types/templates/post-types/post-type-php-export.php on line 2
    • > PHP Notice
      Undefined variable: pairs in wp-content/plugins/ultimate-post-types/templates/post-types/taxonomy-php-export.php on line 5
    • > PHP Notice
      Undefined variable: items in wp-content/plugins/ultimate-post-types/templates/post-types/post-type-php-export-features.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: taxonomy, cpt, custom fields, ultimate fields, repeater...

ultimate-post-types/ultimate-post-types.php 85% from 13 tests

The main PHP file in "Ultimate Post Types" ver. 3.0 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:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "4.9")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin2,103 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP153718601,602
PO File1194200489
JavaScript14312

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity16.20
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes10
▷ Abstract classes220.00%
▷ Concrete classes880.00%
▷ Final classes00.00%
Methods96
▷ Static methods77.29%
▷ Public methods8487.50%
▷ Protected methods1212.50%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin