84% exif-caption

Code Review | Exif Caption

WordPress plugin Exif Caption scored84%from 54 tests.

About plugin

  • Plugin page: exif-caption
  • Plugin version: 3.08
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Oct 28, 2023
  • Number of updates: 112
  • Update frequency: every 26.0 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active /20,327 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.52ms] Passed 4 tests

An overview of server-side resources used by Exif Caption
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1635.69 ▼4.66
Dashboard /wp-admin3.45 ▲0.1545.07 ▲0.21
Posts /wp-admin/edit.php3.57 ▲0.2147.16 ▼2.96
Add New Post /wp-admin/post-new.php6.04 ▲0.1581.65 ▼2.68
Media Library /wp-admin/upload.php3.38 ▲0.1538.53 ▲4.42
Exif Caption /wp-admin/upload.php?page=exifcaption-settings3.3534.81

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Exif Caption
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.51 ▲0.161.72 ▲0.1336.72 ▼0.46
Dashboard /wp-admin2,202 ▲385.64 ▲0.0780.24 ▼17.3338.38 ▼1.30
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0234.88 ▼1.1433.10 ▼3.42
Add New Post /wp-admin/post-new.php1,539 ▲1318.20 ▼5.47642.86 ▲15.1871.70 ▲28.41
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.06109.75 ▲14.4547.46 ▲4.48
Exif Caption /wp-admin/upload.php?page=exifcaption-settings1,2952.0126.7129.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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
Good news, no errors were detected

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 fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/exif-caption/lib/class-exifcaptionadmin.php:37
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/exif-caption/lib/class-tt-exifcaption-list-table.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/exif-caption/lib/class-exifcaption.php:37
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-screen.php): failed to open stream: No such file or directory in wp-content/plugins/exif-caption/lib/class-tt-exifcaption-list-table.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/exif-caption/lib/class-exifcaption.php:37
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/exif-caption/lib/class-tt-exifcaption-list-table.php on line 26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
4 plugin tags: photos, media library, exif, caption

exif-caption/exifcaption.php 92% from 13 tests

The primary PHP file in "Exif Caption" version 3.08 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("exif-caption.php" instead of "exifcaption.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin896 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5115316896

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity44.00
▷ Minimum class complexity32.00
▷ Maximum class complexity51.00
Average method complexity6.58
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1885.71%
▷ Protected methods00.00%
▷ Private methods314.29%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
No PNG images were found in this plugin