84% imagelightbox-smooth-theme

Code Review | imageLightbox Smooth theme

WordPress plugin imageLightbox Smooth theme scored84%from 54 tests.

About plugin

  • Plugin page: imagelightbox-smo...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 6.3.1
  • First release: May 21, 2014
  • Latest release: May 21, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bjornjohansen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /843 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by imageLightbox Smooth theme
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /126.92 ▲123.46398.01 ▲361.65
Dashboard /wp-admin3.32 ▲0.0145.43 ▼2.35
Posts /wp-admin/edit.php3.37 ▲0.0146.85 ▼1.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.51 ▼15.03
Media Library /wp-admin/upload.php3.24 ▲0.0133.39 ▲1.02

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for imageLightbox Smooth theme
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,463 ▼30813.56 ▼0.860.78 ▼1.0412.94 ▼32.64
Dashboard /wp-admin2,206 ▲185.90 ▲1.03109.39 ▼13.2440.54 ▼2.06
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0740.27 ▼1.8236.45 ▲1.68
Add New Post /wp-admin/post-new.php1,528 ▼1418.26 ▼0.22634.35 ▼36.0762.85 ▲2.55
Media Library /wp-admin/upload.php1,391 ▲94.27 ▲0.0996.00 ▼8.0845.88 ▼1.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/imagelightbox-smooth-theme/imagelightbox-theme-smooth.php:36

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 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: mobile, theme, touch, lightbox, images...

imagelightbox-smooth-theme/imagelightbox-theme-smooth.php 85% from 13 tests

The main PHP file in "imageLightbox Smooth theme" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("imagelightbox-smooth-theme.php" instead of "imagelightbox-theme-smooth.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected346 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS2010260
JavaScript25063
PHP1132123

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.18
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ 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
There were not PNG files found in your plugin