68% gp-subtitle-for-pages-and-posts

Code Review | Gp Subtitle for Post, Pages and Custom Type

WordPress plugin Gp Subtitle for Post, Pages and Custom Type scored68%from 54 tests.

About plugin

  • Plugin page: gp-subtitle-for-p...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Sep 3, 2021
  • Latest release: Sep 6, 2021
  • Number of updates: 17
  • Update frequency: every 0.2 days
  • Top authors: grapdevs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /636 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼33.66ms] Passed 4 tests

A check of server-side resources used by Gp Subtitle for Post, Pages and Custom Type
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.49 ▼6.28
Dashboard /wp-admin3.05 ▼0.2626.09 ▼26.41
Posts /wp-admin/edit.php3.05 ▼0.3124.72 ▼26.05
Add New Post /wp-admin/post-new.php3.05 ▼2.8425.70 ▼71.48
Media Library /wp-admin/upload.php3.05 ▼0.1826.14 ▼10.68

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Gp Subtitle for Post, Pages and Custom Type
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲3614.07 ▼0.651.66 ▼0.4743.89 ▲3.26
Dashboard /wp-admin2,228 ▲515.52 ▼0.1486.89 ▼5.3374.28 ▲30.31
Posts /wp-admin/edit.php2,130 ▲251.97 ▼0.0132.95 ▼4.9736.01 ▲3.34
Add New Post /wp-admin/post-new.php1,560 ▲3222.96 ▲0.09737.18 ▲102.5255.33 ▼5.84
Media Library /wp-admin/upload.php1,424 ▲274.20 ▼0.03102.63 ▲1.7379.03 ▲35.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/gp-subtitle-for-pages-and-posts/Gp_Subtitle.php+104
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/gp-subtitle-for-pages-and-posts/Gp_Subtitle.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/gp-subtitle-for-pages-and-posts/GP_public_methods.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/gp-subtitle-for-pages-and-posts/admin/GP_admin_settings.php:181

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Requires php: Version not formatted correctly
You can take inspiration from this readme.txt

gp-subtitle-for-pages-and-posts/Gp_Subtitle.php 92% from 13 tests

The principal PHP file in "Gp Subtitle for Post, Pages and Custom Type" v. 2.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gp-subtitle-for-pages-and-posts.php" instead of "Gp_Subtitle.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin287 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP58577265
CSS11121
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity16.50
▷ Minimum class complexity13.00
▷ Maximum class complexity20.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods1050.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin