84% caption-links

Code Review | Caption Linker

WordPress plugin Caption Linker scored84%from 54 tests.

About plugin

  • Plugin page: caption-links
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: May 2, 2013
  • Latest release: Oct 6, 2015
  • Number of updates: 16
  • Update frequency: every 55.4 days
  • Top authors: weissmike (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /2,341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.10ms] Passed 4 tests

An overview of server-side resources used by Caption Linker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.33 ▼5.39
Dashboard /wp-admin3.31 ▼0.0344.43 ▼25.17
Posts /wp-admin/edit.php3.36 ▲0.0150.98 ▲2.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.90 ▼4.19
Media Library /wp-admin/upload.php3.23 ▲0.0136.36 ▲5.63

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Caption Linker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.56 ▼0.811.57 ▼0.4638.80 ▼5.21
Dashboard /wp-admin2,213 ▲254.90 ▼0.00104.06 ▼16.5640.02 ▼6.49
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0140.76 ▲4.6835.36 ▼1.51
Add New Post /wp-admin/post-new.php1,518 ▼123.13 ▼0.10633.15 ▼54.8955.97 ▼3.63
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.00102.86 ▼4.5345.47 ▼0.49

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× 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/caption-links/caption-linker.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
6 plugin tags: upload, file, media, caption, html...

caption-links/caption-linker.php 92% from 13 tests

The principal PHP file in "Caption Linker" v. 1.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("caption-links.php" instead of "caption-linker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin102 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17954
CSS10035
PHP1402113

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin