83% foogallery-captions

Code Review | FooGallery Captions

WordPress plugin FooGallery Captions scored83%from 54 tests.

About plugin

  • Plugin page: foogallery-captions
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.1
  • WordPress version: 6.3.1
  • First release: May 4, 2015
  • Latest release: Jun 9, 2015
  • Number of updates: 7
  • Update frequency: every 5.7 days
  • Top authors: tormorten (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.99ms] Passed 4 tests

This is a short check of server-side resources used by FooGallery Captions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.81 ▼0.91
Dashboard /wp-admin3.33 ▲0.0251.01 ▼7.11
Posts /wp-admin/edit.php3.38 ▲0.0251.69 ▼1.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.73 ▼6.88
Media Library /wp-admin/upload.php3.25 ▲0.0239.63 ▲2.93

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

FooGallery Captions: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.221.66 ▲0.0540.79 ▼3.07
Dashboard /wp-admin2,189 ▲125.49 ▼0.0396.58 ▼4.1643.06 ▼0.86
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0441.03 ▲5.8634.61 ▼0.56
Add New Post /wp-admin/post-new.php1,526 ▼022.97 ▼0.63663.23 ▼42.8155.02 ▲0.21
Media Library /wp-admin/upload.php1,400 ▼04.30 ▲0.0998.40 ▼2.4142.05 ▼7.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× 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/foogallery-captions/foogallery-individual-captions.php:243

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: separate captions, foogallery, captions, individual captions

foogallery-captions/foogallery-individual-captions.php 77% from 13 tests

The principal PHP file in "FooGallery Captions" v. 1.0.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/lang/")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang/")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("foogallery-captions.php" instead of "foogallery-individual-captions.php")

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
There were no executable files found in this plugin186 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15677112
JavaScript127052
CSS12022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin