84% customizer-responsive-device-preview

Code Review | Customizer Responsive Server-Side Components Device Preview

WordPress plugin Customizer Responsive Server-Side Components Device Preview scored84%from 54 tests.

About plugin

  • Plugin page: customizer-respon...
  • Plugin version: 0.1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Oct 29, 2016
  • Latest release: Nov 9, 2017
  • Number of updates: 8
  • Update frequency: every 49.8 days
  • Top authors: westonruter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,596 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
Installer ran successfully

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

Server-side resources used by Customizer Responsive Server-Side Components Device Preview
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.82 ▼0.94
Dashboard /wp-admin3.32 ▼0.0245.59 ▼15.28
Posts /wp-admin/edit.php3.38 ▲0.0146.85 ▼1.90
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.62 ▼15.07
Media Library /wp-admin/upload.php3.25 ▲0.0132.65 ▼2.19

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Customizer Responsive Server-Side Components Device Preview
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.26 ▼1.374.36 ▲2.4941.96 ▲2.26
Dashboard /wp-admin2,206 ▲185.86 ▲0.95103.17 ▼11.3742.10 ▼5.61
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0435.67 ▼7.1133.63 ▼0.88
Add New Post /wp-admin/post-new.php1,542 ▲918.46 ▼4.68620.79 ▼40.4052.04 ▲1.07
Media Library /wp-admin/upload.php1,391 ▲34.28 ▲0.1194.01 ▼12.4140.35 ▼6.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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)
Good news, no errors were detected

SRP 50% 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Customizer_Responsive_Device_Preview\\add_action() in wp-content/plugins/customizer-responsive-device-preview/customizer-responsive-device-preview.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: customize, customizer, preview, ress, rwd...

customizer-responsive-device-preview/customizer-responsive-device-preview.php 92% from 13 tests

Analyzing the main PHP file in "Customizer Responsive Server-Side Components Device Preview" version 0.1.1
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin87 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1104752
JavaScript162035

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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
Namespaces1
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected