78% codexin-image-gallery

Code Review | Photo Gallery by Codexin - Image Gallery with Lightbox

WordPress plugin Photo Gallery by Codexin - Image Gallery with Lightbox scored78%from 54 tests.

About plugin

  • Plugin page: codexin-image-gal...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2020
  • Latest release: Nov 2, 2022
  • Number of updates: 10
  • Update frequency: every 69.0 days
  • Top authors: cxntech (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,096 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
Install script ran successfully

Server metrics [RAM: ▲1.96MB] [CPU: ▲6.23ms] Passed 4 tests

Analyzing server-side resources used by Photo Gallery by Codexin - Image Gallery with Lightbox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.41 ▲1.9552.02 ▲12.55
Dashboard /wp-admin5.31 ▲2.0158.36 ▲1.71
Posts /wp-admin/edit.php5.36 ▲2.0058.91 ▲10.08
Add New Post /wp-admin/post-new.php7.84 ▲1.9594.39 ▲0.56
Media Library /wp-admin/upload.php5.15 ▲1.9152.83 ▲17.83
All Galleries /wp-admin/edit.php?post_type=cdxn-gallery5.2251.24
Add New Gallery /wp-admin/post-new.php?post_type=cdxn-gallery5.3564.95

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Photo Gallery by Codexin - Image Gallery with Lightbox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,124 ▲38918.32 ▲3.671.93 ▲0.1639.33 ▼6.56
Dashboard /wp-admin2,501 ▲3139.17 ▲4.10185.11 ▲73.0437.76 ▼4.93
Posts /wp-admin/edit.php2,404 ▲3126.20 ▲4.2073.65 ▲30.6230.46 ▼4.32
Add New Post /wp-admin/post-new.php1,606 ▲9220.10 ▲2.67789.64 ▲152.0550.29 ▼6.12
Media Library /wp-admin/upload.php1,543 ▲1526.59 ▲2.40111.65 ▲12.6941.92 ▼0.63
All Galleries /wp-admin/edit.php?post_type=cdxn-gallery1,4196.2183.1227.95
Add New Gallery /wp-admin/post-new.php?post_type=cdxn-gallery2,73810.05214.7957.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/codexin-image-gallery/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 210× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/codexin-image-gallery/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Custom_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Media_Gallery_Field' not found in wp-content/plugins/codexin-image-gallery/extension/core/Gallery_Field.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Container\\Fulfillable\\Fulfillable' not found in wp-content/plugins/codexin-image-gallery/vendor/htmlburger/carbon-fields/core/Container/Fulfillable/Fulfillable_Collection.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/codexin-image-gallery/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/codexin-image-gallery/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Equality_Comparer.php:5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/codexin-image-gallery/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 35
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installer\\LibraryInstaller' not found in wp-content/plugins/codexin-image-gallery/vendor/composer/installers/src/Composer/Installers/Installer.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/codexin-image-gallery/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Post_Meta_Datastore' not found in wp-content/plugins/codexin-image-gallery/vendor/htmlburger/carbon-fields/core/Datastore/Nav_Menu_Item_Datastore.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/codexin-image-gallery/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php:4

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
5 plugin tags: wordpress gallery plugin, image showcase, photo gallery, responsive image gallery, image gallery

codexin-image-gallery/codexin-image-gallery.php 92% from 13 tests

The main PHP script in "Photo Gallery by Codexin - Image Gallery with Lightbox" version 1.1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 236 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected34,369 lines of code in 525 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1695,4978,86913,333
PHP2633,0197,87012,343
CSS166341,2483,853
PO File268191,0202,202
Sass4632901,751
HTML1404441
JSON200378
SVG21368

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.58
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces28
Interfaces5
Traits0
Classes233
▷ Abstract classes125.15%
▷ Concrete classes22194.85%
▷ Final classes10.45%
Methods1,037
▷ Static methods969.26%
▷ Public methods81778.78%
▷ Protected methods19618.90%
▷ Private methods242.31%
Functions112
▷ Named functions2623.21%
▷ Anonymous functions8676.79%
Constants39
▷ Global constants1333.33%
▷ Class constants2666.67%
▷ Public constants26100.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
7 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vendor/styles/default-skin.png0.53KB0.72KB0.00%
assets/images/icon/plus.png2.25KB2.24KB▼ 0.65%
assets/images/icon/heart.png8.17KB9.07KB0.00%
assets/images/icon/eye.png7.29KB7.68KB0.00%
assets/images/icon/plant-leafs.png6.23KB6.92KB0.00%