84% kings-caption-hover

Code Review | Kings Caption Hover

WordPress plugin Kings Caption Hover scored84%from 54 tests.

About plugin

  • Plugin page: kings-caption-hover
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.3-4.0
  • WordPress version: 6.3.1
  • First release: Aug 7, 2014
  • Latest release: Oct 9, 2014
  • Number of updates: 12
  • Update frequency: every 5.5 days
  • Top authors: KingsRRF (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,846 total downloads

Benchmarks

Plugin footprint 83% 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.02MB] [CPU: ▼7.25ms] Passed 4 tests

An overview of server-side resources used by Kings Caption Hover
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.27 ▼7.25
Dashboard /wp-admin3.33 ▼0.0149.81 ▼4.88
Posts /wp-admin/edit.php3.39 ▲0.0346.42 ▼8.85
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.86 ▼8.03
Media Library /wp-admin/upload.php3.26 ▲0.0336.06 ▲2.64
Hover Captions /wp-admin/edit.php?post_type=captionhover3.3039.06
Add New /wp-admin/post-new.php?post_type=captionhover3.3850.13
Caption Hover Category /wp-admin/edit-tags.php?taxonomy=caption_hover_cat&post_type=captionhover3.2533.77

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Kings Caption Hover
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲22113.54 ▼1.028.40 ▲6.6739.95 ▼3.15
Dashboard /wp-admin2,252 ▲645.85 ▼0.1498.41 ▼19.2839.92 ▼1.31
Posts /wp-admin/edit.php2,098 ▲92.06 ▲0.0242.60 ▲0.1336.51 ▼0.82
Add New Post /wp-admin/post-new.php1,556 ▲2818.35 ▲0.12640.88 ▲20.8056.09 ▲0.55
Media Library /wp-admin/upload.php1,437 ▲464.21 ▲0.0297.40 ▼10.4443.85 ▲0.01
Hover Captions /wp-admin/edit.php?post_type=captionhover1,0982.0137.8528.99
Add New /wp-admin/post-new.php?post_type=captionhover2,4097.76165.8366.30
Caption Hover Category /wp-admin/edit-tags.php?taxonomy=caption_hover_cat&post_type=captionhover1,3142.1826.8229.56

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kings-caption-hover/plugin-hook.php:15

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: responsive portfolio, gallery, gallery effect, portfolio effect, image...

kings-caption-hover/plugin-hook.php 92% from 13 tests

The main PHP file in "Kings Caption Hover" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kings-caption-hover.php" instead of "plugin-hook.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
Success! There were no dangerous files found in this plugin83 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP141880
JavaScript2032
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin