88% circles-gallery

Code Review | Circles Gallery

WordPress plugin Circles Gallery scored 88% from 54 tests.

About plugin

  • Plugin page: circles-gallery
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.2
  • WordPress version: 5.9.2
  • First release: Oct 22, 2014
  • Latest release: Jul 17, 2019
  • Number of updates: 18
  • Update frequency: every 96.1 days
  • Top authors: GreenTreeLabs (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 31,987 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Circles Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2358.96 ▲4.05
Dashboard /wp-admin3.71 ▲0.3040.62 ▼39.21
Posts /wp-admin/edit.php3.94 ▲0.3048.96 ▲4.62
Add New Post /wp-admin/post-new.php7.17 ▲0.20100.03 ▼1,224.68
Media Library /wp-admin/upload.php3.63 ▲0.3331.40 ▲2.31
Circles Gallery /wp-admin/options-general.php?page=circles-gallery3.5627.11

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 64 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Circles Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,915 ▲16115.73 ▼0.0110.31 ▲3.742.80 ▲0.26
Dashboard /wp-admin2,907 ▲496.18 ▼0.05116.41 ▼20.56154.24 ▼6.26
Posts /wp-admin/edit.php2,706 ▲193.24 ▲0.0163.90 ▼32.12140.27 ▼11.29
Add New Post /wp-admin/post-new.php1,723 ▼3721.74 ▼0.71485.37 ▲46.40164.97 ▲6.25
Media Library /wp-admin/upload.php1,713 ▲125.47 ▼0.05145.25 ▲4.86184.36 ▼0.84
Circles Gallery /wp-admin/options-general.php?page=circles-gallery2,3043.9398.11218.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/circles-gallery/public/views/public.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/circles-gallery/admin/views/options.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/circles-gallery/admin/includes/cg-shortcode-editor.php:11
    • > PHP Notice
      Undefined variable: admin_url in wp-content/plugins/circles-gallery/admin/includes/cg-shortcode-editor.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/circles-gallery/admin/views/hover_slider.php:5
    • > PHP Notice
      Undefined variable: from_editor in wp-content/plugins/circles-gallery/admin/views/options.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 41 tag instead of maximum 10
You can look at the official readme.txt

circles-gallery/circles-gallery.php 92% from 13 tests

Analyzing the main PHP file in "Circles Gallery" version 1.0.10
The following require your attention:
  • 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 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected7,352 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS416424,773
PHP114827472,542
JavaScript453837

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity58.29
▷ Minimum class complexity4.00
▷ Maximum class complexity209.00
Average method complexity5.31
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods93
▷ Static methods1516.13%
▷ Public methods5458.06%
▷ Protected methods3234.41%
▷ Private methods77.53%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants53
▷ Global constants5298.11%
▷ Class constants11.89%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png36.39KB15.59KB▼ 57.15%
public/assets/lightbox/img/prev.png1.33KB1.59KB0.00%
admin/assets/img/icon.png0.74KB0.69KB▼ 6.83%
admin/assets/img/pro-strip.png0.50KB0.44KB▼ 10.83%
public/assets/lightbox/img/next.png1.32KB1.58KB0.00%