78% post-type-information

Code Review | Post Type Information

WordPress plugin Post Type Information scored 78% from 54 tests.

About plugin

  • Plugin page: post-type-informa...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2016
  • Latest release: Nov 30, 2022
  • Number of updates: 6
  • Update frequency: every 419.2 days
  • Top authors: grandslambert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 568 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
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.65ms] Passed 4 tests

An overview of server-side resources used by Post Type Information
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.11 ▼9.11
Dashboard /wp-admin3.39 ▲0.0847.88 ▼3.25
Posts /wp-admin/edit.php3.50 ▲0.1452.45 ▲9.06
Add New Post /wp-admin/post-new.php5.99 ▲0.1097.39 ▲1.56
Media Library /wp-admin/upload.php3.31 ▲0.0836.24 ▲0.20
Post Type Information /wp-admin/options-general.php?page=gs-post-type-information3.2933.78

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Post Type Information
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.62 ▼0.764.73 ▲2.6836.60 ▼6.96
Dashboard /wp-admin2,214 ▲264.87 ▼0.03106.69 ▼9.2642.81 ▼2.81
Posts /wp-admin/edit.php2,094 ▲52.05 ▲0.0239.64 ▲0.7833.90 ▲3.65
Add New Post /wp-admin/post-new.php1,530 ▲1618.60 ▼4.88602.18 ▼8.8054.79 ▲1.38
Media Library /wp-admin/upload.php1,393 ▲114.19 ▲0.0094.56 ▼5.9842.11 ▼2.63
Post Type Information /wp-admin/options-general.php?page=gs-post-type-information8982.0324.7733.52

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/post-type-information/public/partials/gs-post-type-information-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/post-type-information/admin/partials/gs-post-type-information-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: comments, spam

post-type-information/gs-post-type-information.php 85% from 13 tests

The main PHP file in "Post Type Information" ver. 1.0.1 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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("post-type-information.php" instead of "gs-post-type-information.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin336 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12131592330
JavaScript24546
CSS2080

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.15
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin