84% register-post-types-and-taxonomies

Code Review | Register Post Types and Taxonomies

WordPress plugin Register Post Types and Taxonomies scored84%from 54 tests.

About plugin

  • Plugin page: register-post-typ...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2015
  • Latest release: Mar 4, 2016
  • Number of updates: 5
  • Update frequency: every 44.0 days
  • Top authors: alexvorn2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,369 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▲1.52ms] Passed 4 tests

A check of server-side resources used by Register Post Types and Taxonomies
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.75 ▲6.20
Dashboard /wp-admin3.43 ▲0.1252.35 ▲0.22
Posts /wp-admin/edit.php3.54 ▲0.1853.91 ▲3.01
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.16 ▲0.63
Media Library /wp-admin/upload.php3.35 ▲0.1240.85 ▲2.21
Register Taxonomies /wp-admin/plugins.php?page=register_taxonomies3.3236.09
Register Post Types /wp-admin/plugins.php?page=register_post_types3.3237.00

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/register-post-types-and-taxonomies/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Register Post Types and Taxonomies
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲8713.27 ▼1.115.42 ▲3.6443.66 ▼0.63
Dashboard /wp-admin2,232 ▲264.83 ▼0.07102.60 ▼3.1741.62 ▼3.92
Posts /wp-admin/edit.php2,108 ▲52.01 ▼0.0234.34 ▼2.0937.76 ▲3.20
Add New Post /wp-admin/post-new.php1,532 ▲117.51 ▼5.54683.22 ▲26.8555.85 ▼4.36
Media Library /wp-admin/upload.php1,408 ▲84.23 ▲0.0497.54 ▼7.4441.52 ▼1.97
Register Taxonomies /wp-admin/plugins.php?page=register_taxonomies1,0672.0225.0928.58
Register Post Types /wp-admin/plugins.php?page=register_post_types1,0432.0524.6431.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/register-post-types-and-taxonomies/includes/admin/class-taxonomies-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/register-post-types-and-taxonomies/includes/admin/class-post-types-table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/register-post-types-and-taxonomies/includes/admin/class-post-types-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/register-post-types-and-taxonomies/includes/admin/class-taxonomies-table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/register-post-types-and-taxonomies/includes/admin/class-taxonomies-table.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/register-post-types-and-taxonomies/includes/admin/class-post-types-table.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: post-types, taxonomies, register, post-type, taxonomy

register-post-types-and-taxonomies/register-post-types-and-taxonomies.php Passed 13 tests

This is the main PHP file of "Register Post Types and Taxonomies" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
140 characters long description:
This plugin will help you register new post types and taxonomies. (Go to: Dashboard -> Plugins -> Register Post Types / Register Taxonomies)

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 plugin728 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP1028463728

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.67
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods969.23%
▷ Protected methods215.38%
▷ Private methods215.38%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin