83% crisp-gallery

Code Review | Crisp Gallery

WordPress plugin Crisp Gallery scored83%from 54 tests.

About plugin

  • Plugin page: crisp-gallery
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2017
  • Latest release: Aug 26, 2017
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: wppatrickk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /776 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.71ms] Passed 4 tests

An overview of server-side resources used by Crisp Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.91 ▼7.42
Dashboard /wp-admin3.42 ▲0.1247.18 ▼3.75
Posts /wp-admin/edit.php3.53 ▲0.1846.12 ▼2.55
Add New Post /wp-admin/post-new.php6.00 ▲0.1290.50 ▲4.07
Media Library /wp-admin/upload.php3.34 ▲0.1234.25 ▲2.89
Add New /wp-admin/post-new.php?post_type=crispgallery3.4048.22
Gallery /wp-admin/edit.php?post_type=crispgallery3.4242.56

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Crisp Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲5913.34 ▼1.344.36 ▲2.3540.83 ▼4.51
Dashboard /wp-admin2,236 ▲444.91 ▼0.0597.58 ▼22.7039.86 ▼4.15
Posts /wp-admin/edit.php2,119 ▲272.01 ▲0.0540.60 ▲2.2735.92 ▲4.01
Add New Post /wp-admin/post-new.php1,557 ▲2423.35 ▲0.08678.26 ▼29.3455.87 ▲0.89
Media Library /wp-admin/upload.php1,418 ▲334.23 ▼0.0595.66 ▼3.0841.07 ▲0.09
Add New /wp-admin/post-new.php?post_type=crispgallery2,0984.2591.5984.52
Gallery /wp-admin/edit.php?post_type=crispgallery1,2573.7957.5027.31

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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 no errors were found, this is by no means an exhaustive test

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
  • 4× 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/crisp-gallery/inc/gallery.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crisp-gallery/inc/crispgallery-metabox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/crisp-gallery/crispgallery.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/crisp-gallery/inc/crispgallery-shortcode.php:111

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

crisp-gallery/crispgallery.php 85% from 13 tests

The main PHP script in "Crisp Gallery" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("crisp-gallery.php" instead of "crispgallery.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected904 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP488111422
CSS4460218
JavaScript43812129
PO File14954109
Markdown112026

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/theme-banner.png5.53KB1.94KB▼ 64.88%
css/images/gallery-previous.png1.26KB0.37KB▼ 70.71%
images/close.png0.27KB0.29KB0.00%
css/images/gallery-next.png0.43KB0.36KB▼ 16.33%
css/images/plugin-support.png3.37KB1.14KB▼ 66.04%