83% where-are-my-post-types

Code Review | Where are my Post Types

WordPress plugin Where are my Post Types scored83%from 54 tests.

About plugin

  • Plugin page: where-are-my-post...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8
  • WordPress version: 6.3.1
  • First release: Apr 8, 2014
  • Latest release: Apr 9, 2014
  • Number of updates: 2
  • Update frequency: every 4.5 days
  • Top authors: sujin2f (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /592 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.01MB] [CPU: ▼5.59ms] Passed 4 tests

This is a short check of server-side resources used by Where are my Post Types
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.37 ▼11.27
Dashboard /wp-admin3.32 ▲0.0244.34 ▲0.18
Posts /wp-admin/edit.php3.37 ▲0.0250.21 ▲3.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.55 ▼8.85
Media Library /wp-admin/upload.php3.24 ▲0.0234.58 ▼2.43
Where are my post types? /wp-admin/options-general.php?page=where-are-my-post-type3.2329.16

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Where are my Post Types: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.66 ▼0.604.67 ▲2.7441.83 ▼0.63
Dashboard /wp-admin2,208 ▲175.84 ▲0.94102.36 ▼0.0135.75 ▼6.12
Posts /wp-admin/edit.php2,100 ▲112.02 ▲0.0140.80 ▲4.8335.64 ▲1.08
Add New Post /wp-admin/post-new.php1,521 ▼1223.10 ▼0.18634.58 ▼44.6751.48 ▼13.09
Media Library /wp-admin/upload.php1,396 ▲84.22 ▲0.0599.08 ▼6.8443.37 ▼0.63
Where are my post types? /wp-admin/options-general.php?page=where-are-my-post-type9032.0531.3530.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/where-are-my-post-types/functions/type-walker.php:10

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: post type

where-are-my-post-types/init.php 77% from 13 tests

"Where are my Post Types" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: A good plugin description is longer than 10 characters (currently 0 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("where-are-my-post-types.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected525 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP613793501
JavaScript14523
CSS1151

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity5.31
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected