84% prettygallery

Code Review | PrettyGallery

WordPress plugin PrettyGallery scored84%from 54 tests.

About plugin

  • Plugin page: prettygallery
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0.1
  • WordPress version: 6.3.1
  • First release: Oct 11, 2013
  • Latest release: Dec 14, 2014
  • Number of updates: 6
  • Update frequency: every 71.5 days
  • Top authors: webnoetic (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

90+ active /2,521 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.96ms] Passed 4 tests

An overview of server-side resources used by PrettyGallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0524.70 ▼15.07
Dashboard /wp-admin3.33 ▲0.0345.51 ▼3.27
Posts /wp-admin/edit.php3.38 ▲0.0349.44 ▲4.69
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.02 ▼14.51
Media Library /wp-admin/upload.php3.25 ▲0.0336.35 ▲1.03

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

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

Browser metrics Passed 4 tests

A check of browser resources used by PrettyGallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲18413.58 ▼0.808.43 ▲6.6743.54 ▼1.26
Dashboard /wp-admin2,206 ▲215.88 ▲0.00100.41 ▼2.5341.44 ▼2.75
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0539.64 ▲2.6235.34 ▲2.15
Add New Post /wp-admin/post-new.php1,519 ▼923.36 ▲5.20686.86 ▲82.1655.78 ▲5.76
Media Library /wp-admin/upload.php1,388 ▼34.23 ▼0.0399.13 ▲3.3941.07 ▼2.14

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_shortcode() in wp-content/plugins/prettygallery/prettygallery.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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
8 plugin tags: jquery modal box, gallery modal box, gallery shortcode, gallery, javascript gallery...

prettygallery/prettygallery.php Passed 13 tests

This is the main PHP file of "PrettyGallery" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
70 characters long description:
Integrate Wordpress default gallery shortcode with jquery modal popup.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected192 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13645143
CSS15748
JavaScript1061

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity13.67
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/border.png0.11KB0.10KB▼ 7.14%
css/images/loading_background.png0.15KB0.15KB▼ 0.64%
css/images/overlay.png0.18KB0.15KB▼ 15.93%
css/images/controls.png2.83KB1.28KB▼ 54.82%