10% post-title-icons

Code Review | Post Title Icons

WordPress plugin Post Title Icons scored10%from 54 tests.

About plugin

  • Plugin page: post-title-icons
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2015
  • Latest release: Oct 11, 2016
  • Number of updates: 34
  • Update frequency: every 15.0 days
  • Top authors: gizan (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /3,090 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/post-title-icons/includes/display-functions.php+5
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼2.00MB] [CPU: ▼58.78ms] Passed 4 tests

Server-side resources used by Post Title Icons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.465.62 ▼35.25
Dashboard /wp-admin2.06 ▼1.337.00 ▼56.17
Posts /wp-admin/edit.php2.06 ▼1.347.31 ▼45.72
Add New Post /wp-admin/post-new.php2.06 ▼3.877.06 ▼97.98
Media Library /wp-admin/upload.php2.06 ▼1.216.65 ▼26.85
Post Icons /wp-admin/options-general.php?page=ggs-options2.066.92

Server storage [IO: ▲0.06MB] [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: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Post Title Icons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.491.58 ▼0.2142.38 ▼0.08
Dashboard /wp-admin2,199 ▲195.62 ▼0.0584.24 ▼2.4241.32 ▲1.87
Posts /wp-admin/edit.php2,104 ▲72.02 ▲0.0142.15 ▲5.9339.07 ▲4.35
Add New Post /wp-admin/post-new.php1,539 ▲1118.21 ▼4.75619.70 ▼73.8471.18 ▲11.96
Media Library /wp-admin/upload.php1,404 ▲74.18 ▼0.0194.50 ▼9.9141.12 ▼7.39
Post Icons /wp-admin/options-general.php?page=ggs-options1,0301.9924.6529.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/post-title-icons/includes/display-functions.php+5
    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-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ggs-options
    • > Notice in wp-content/plugins/post-title-icons/includes/admin-page.php+129
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-title-icons/includes/scripts.php:12
    • > PHP Notice
      Undefined variable: ggs_options in wp-content/plugins/post-title-icons/includes/display-functions.php on line 18
    • > PHP Notice
      Undefined variable: ggs_options in wp-content/plugins/post-title-icons/includes/display-functions.php on line 31
    • > PHP Notice
      Undefined variable: ggs_options in wp-content/plugins/post-title-icons/includes/display-functions.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-title-icons/includes/display-functions.php:51
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/post-title-icons/includes/display-functions.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-title-icons/includes/admin-page.php:157
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-title-icons/post-title-icons.php:20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/post-title-icons/includes/display-functions.php on line 18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/post-title-icons/includes/display-functions.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #3, #0 in post-title-icons/assets to your readme.txt
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === post-title-icons === )
The official readme.txt might help

post-title-icons/post-title-icons.php Passed 13 tests

The entry point to "Post Title Icons" version 1.3 is a PHP file that has certain tags in its header comment area
48 characters long description:
This plugin will add an icon to your post titles

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected221 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP56631218
CSS1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin