84% gallery-custom-links

Code Review | Gallery Custom Links

WordPress plugin Gallery Custom Links scored84%from 54 tests.

About plugin

  • Plugin page: gallery-custom-links
  • Plugin version: 2.1.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 28, 2018
  • Latest release: Oct 23, 2023
  • Number of updates: 87
  • Update frequency: every 20.6 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

187 reviews

Install metrics

40,000+ active /642,568 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▼6.22ms] Passed 4 tests

An overview of server-side resources used by Gallery Custom Links
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2841.82 ▲2.28
Dashboard /wp-admin3.60 ▲0.2652.30 ▼11.92
Posts /wp-admin/edit.php3.65 ▲0.2948.57 ▲2.99
Add New Post /wp-admin/post-new.php6.14 ▲0.2583.74 ▼18.24
Media Library /wp-admin/upload.php3.46 ▲0.2349.95 ▲15.40
Dashboard /wp-admin/admin.php?page=meowapps-main-menu3.6352.87
Custom Links /wp-admin/admin.php?page=mgcl_settings3.4336.52

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Gallery Custom Links
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲7913.93 ▼0.641.87 ▲0.1845.57 ▲8.96
Dashboard /wp-admin2,262 ▲855.78 ▲0.10112.54 ▲26.4945.07 ▲4.38
Posts /wp-admin/edit.php2,152 ▲523.02 ▲1.0041.65 ▲4.4731.26 ▼3.98
Add New Post /wp-admin/post-new.php1,586 ▲6024.34 ▲1.46679.23 ▲48.7235.38 ▼10.42
Media Library /wp-admin/upload.php1,480 ▲835.29 ▲1.10110.67 ▲8.3747.22 ▲3.81
Dashboard /wp-admin/admin.php?page=meowapps-main-menu5,2542.5433.1447.92
Custom Links /wp-admin/admin.php?page=mgcl_settings1,0923.9275.3438.23

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

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/gallery-custom-links/classes/core.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MeowCommon_Admin' not found in wp-content/plugins/gallery-custom-links/classes/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'DiDom\ode' not found in wp-content/plugins/gallery-custom-links/vendor/imangazaliev/didom/src/DiDom/DocumentFragment.php:11
    • > PHP Fatal error
      require(): Failed opening required 'MGCL_PATH/classes/core.php' (include_path='.:/usr/share/php') in wp-content/plugins/gallery-custom-links/classes/init.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/gallery-custom-links/gallery-custom-links.php:23
    • > PHP Warning
      Use of undefined constant MGCL_PATH - assumed 'MGCL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gallery-custom-links/classes/init.php on line 15
    • > PHP Warning
      require(MGCL_PATH/classes/core.php): failed to open stream: No such file or directory in wp-content/plugins/gallery-custom-links/classes/init.php on line 32
    • > PHP Fatal error
      Uncaught Error: Class 'DiDom\ode' not found in wp-content/plugins/gallery-custom-links/vendor/imangazaliev/didom/src/DiDom/Element.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
4 plugin tags: gallery, custom, gutenberg, links

gallery-custom-links/gallery-custom-links.php 92% from 13 tests

The entry point to "Gallery Custom Links" version 2.1.8 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)

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
No dangerous file extensions were detected7,003 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP381,3951,9765,672
Markdown559601,155
JSON300171
JavaScript20245

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity35.10
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes31
▷ Abstract classes13.23%
▷ Concrete classes3096.77%
▷ Final classes00.00%
Methods370
▷ Static methods5815.68%
▷ Public methods33490.27%
▷ Protected methods308.11%
▷ Private methods61.62%
Functions17
▷ Named functions423.53%
▷ Anonymous functions1376.47%
Constants33
▷ Global constants2987.88%
▷ Class constants412.12%
▷ Public constants4100.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 files were detected