10% polaroid-plus-gallery

Code Review | WP-Polaroid Plus

WordPress plugin WP-Polaroid Plus scored10%from 54 tests.

About plugin

  • Plugin page: polaroid-plus-gal...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 12, 2013
  • Latest release: Apr 27, 2014
  • Number of updates: 14
  • Update frequency: every 25.0 days
  • Top authors: Irena0575 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,191 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/polaroid-plus-gallery/wp-polaroidplus.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; PPGallery has a deprecated constructor

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

Analyzing server-side resources used by WP-Polaroid Plus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.36 ▼0.06
Dashboard /wp-admin3.32 ▲0.0242.86 ▼3.36
Posts /wp-admin/edit.php3.37 ▲0.0145.02 ▼2.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.50 ▼8.20
Media Library /wp-admin/upload.php3.24 ▲0.0135.24 ▲2.52
WP-Polaroid Plus /wp-admin/options-general.php?page=wpPolaroidPlus3.2130.82

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP-Polaroid Plus
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲14713.55 ▼1.037.21 ▲5.0240.57 ▼2.76
Dashboard /wp-admin2,212 ▲245.83 ▼0.05103.98 ▼9.5639.12 ▼2.81
Posts /wp-admin/edit.php2,092 ▲62.02 ▼0.0034.14 ▼1.6135.50 ▲1.43
Add New Post /wp-admin/post-new.php1,542 ▲918.30 ▼5.06648.73 ▲56.2361.14 ▲6.00
Media Library /wp-admin/upload.php1,394 ▲64.28 ▲0.0292.93 ▼4.0340.14 ▼1.82
WP-Polaroid Plus /wp-admin/options-general.php?page=wpPolaroidPlus1,0312.0336.2833.55

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

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

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/polaroid-plus-gallery/uninstall.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/polaroid-plus-gallery/wp-polaroidplus.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (WP-Polaroid Plus), #2 (Choose the options you need.)
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

polaroid-plus-gallery/wp-polaroidplus.php 92% from 13 tests

"WP-Polaroid Plus" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("polaroid-plus-gallery.php" instead of "wp-polaroidplus.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,427 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2181146795
PHP2107104494
CSS1134138

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity6.62
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.26MB with 0.15MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/sliderblack.png0.24KB0.13KB▼ 47.77%
screenshot-1.png227.94KB78.26KB▼ 65.67%
screenshot-2.png41.94KB16.06KB▼ 61.71%
img/slider.png0.24KB0.13KB▼ 48.40%