89% query-all-the-post-types

Code Review | Query All The Post Types - WordPress Post Type Scanner Plugin

WordPress plugin Query All The Post Types - WordPress Post Type Scanner Plugin scored 89% from 54 tests.

About plugin

  • Plugin page: query-all-the-pos...
  • Plugin version: 1.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.0
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Dec 7, 2018
  • Number of updates: 44
  • Update frequency: every 22.3 days
  • Top authors: GeekStreetWP (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active / 4,301 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.42ms] Passed 4 tests

Analyzing server-side resources used by Query All The Post Types - WordPress Post Type Scanner Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.31 ▼10.09
Dashboard /wp-admin3.39 ▲0.0945.69 ▼3.56
Posts /wp-admin/edit.php3.44 ▲0.0846.58 ▲2.81
Add New Post /wp-admin/post-new.php5.97 ▲0.0896.75 ▲0.03
Media Library /wp-admin/upload.php3.31 ▲0.0836.23 ▼0.06
Query The CPTs /wp-admin/options-general.php?page=query_all_the_post_types3.2834.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Query All The Post Types - WordPress Post Type Scanner Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.59 ▼0.791.77 ▼0.0940.77 ▼2.76
Dashboard /wp-admin2,207 ▲226.04 ▲1.1798.30 ▼19.4638.41 ▼12.67
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0341.46 ▲3.1635.51 ▼0.18
Add New Post /wp-admin/post-new.php1,536 ▲123.42 ▲0.30646.52 ▼22.5650.46 ▼7.54
Media Library /wp-admin/upload.php1,392 ▲44.16 ▼0.0894.81 ▼1.9843.06 ▲1.79
Query The CPTs /wp-admin/options-general.php?page=query_all_the_post_types1,3062.1626.7027.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: list, dashboard, posts, custom post type, admin...

query-all-the-post-types/query_all_the_post_types.php 77% from 13 tests

"Query All The Post Types - WordPress Post Type Scanner Plugin" version 1.9.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Git Repository: There should be no Git repositories present in your plugin
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("query-all-the-post-types.php" instead of "query_all_the_post_types.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin677 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP30115677

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected