84% enhanced-captions

Code Review | Enhanced Captions

WordPress plugin Enhanced Captions scored84%from 54 tests.

About plugin

  • Plugin page: enhanced-captions
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2018
  • Latest release: Jan 28, 2018
  • Number of updates: 2
  • Update frequency: every 9.0 days
  • Top authors: enshrined (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /631 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.01MB] [CPU: ▼9.73ms] Passed 4 tests

Server-side resources used by Enhanced Captions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.88 ▲1.39
Dashboard /wp-admin3.32 ▼0.0253.15 ▼13.28
Posts /wp-admin/edit.php3.38 ▲0.0250.47 ▼5.99
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.26 ▼18.70
Media Library /wp-admin/upload.php3.25 ▲0.0233.86 ▼0.96

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Enhanced Captions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.19 ▼0.081.95 ▲0.3743.91 ▲3.57
Dashboard /wp-admin2,197 ▲235.63 ▲0.0485.37 ▼2.6341.47 ▼0.84
Posts /wp-admin/edit.php2,102 ▼11.99 ▼0.0238.64 ▼2.4731.72 ▼4.95
Add New Post /wp-admin/post-new.php1,529 ▲323.16 ▲0.11651.13 ▼7.9155.69 ▲1.75
Media Library /wp-admin/upload.php1,405 ▲54.16 ▼0.02104.06 ▲0.8646.04 ▲1.53

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/enhanced-captions/enhanced-captions.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: enhanced caption, caption title, captions

enhanced-captions/enhanced-captions.php Passed 13 tests

This is the main PHP file of "Enhanced Captions" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
Adds a title field to image captions

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 detected153 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript221898
PHP2249155

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin