78% reveal-box

Code Review | Reveal Box

WordPress plugin Reveal Box scored78%from 54 tests.

About plugin

  • Plugin page: reveal-box
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2013
  • Latest release: Oct 2, 2013
  • Number of updates: 9
  • Update frequency: every 2.1 days
  • Top authors: mickert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,088 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.31MB] [CPU: ▼16.76ms] Passed 4 tests

A check of server-side resources used by Reveal Box
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0236.36 ▼13.42
Dashboard /wp-admin3.32 ▲0.0248.99 ▼3.27
Posts /wp-admin/edit.php3.38 ▲0.0258.11 ▲1.55
Add New Post /wp-admin/post-new.php4.61 ▼1.2745.25 ▼51.88
Media Library /wp-admin/upload.php3.25 ▲0.0242.62 ▲2.23
Reveal Box /wp-admin/options-general.php?page=rb-options3.1931.48

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Reveal Box: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.70 ▼0.582.59 ▲0.8042.42 ▼4.94
Dashboard /wp-admin2,210 ▲225.83 ▼0.07101.37 ▼19.4839.28 ▼4.11
Posts /wp-admin/edit.php2,096 ▲41.99 ▼0.0236.21 ▼1.6632.93 ▲0.74
Add New Post /wp-admin/post-new.php1,517 ▼217.62 ▼5.60662.01 ▼11.5956.22 ▼6.00
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.1999.30 ▼6.6445.03 ▲2.30
Reveal Box /wp-admin/options-general.php?page=rb-options1,2213.3045.8039.73

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rb-options
    • > Notice in wp-content/plugins/reveal-box/includes/admin-page.php+32
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=rb-options
    • > User deprecated in wp-includes/functions.php+5737
    Function wp_editor() was called with an argument that is deprecated since version 3.9.0! TinyMCE editor IDs cannot have brackets.

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
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reveal-box/includes/scripts.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reveal-box/includes/admin-page.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/reveal-box/includes/display-functions.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/reveal-box/reveal-box.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === reveal-box === )
  • Screenshots: These screenshots do not have images: #1 (The modal box in action), #2 (Here you can enter some settings), #3 (On the top right you can see how to modal opens)
Please take inspiration from this readme.txt

reveal-box/reveal-box.php Passed 13 tests

The main PHP script in "Reveal Box" version 0.3 is automatically included on every request by WordPress
63 characters long description:
A plugin wich uses the jQuery modal plugin called Reveal (Zurb)

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 detected250 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12236102
PHP4251784
CSS16364

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/img/modal-gloss.png2.84KB2.69KB▼ 5.43%
includes/img/plus.png2.16KB1.53KB▼ 29.31%