84% wp-designer

Code Review | WP Designer

WordPress plugin WP Designer scored84%from 54 tests.

About plugin

  • Plugin page: wp-designer
  • Plugin version: 2.2.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.8
  • WordPress version: 6.3.1
  • First release: Apr 13, 2015
  • Latest release: Aug 3, 2021
  • Number of updates: 39
  • Update frequency: every 59.2 days
  • Top authors: varun21 (82.05%)aniash_29 (20.51%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /7,206 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.09MB] [CPU: ▼3.99ms] Passed 4 tests

Analyzing server-side resources used by WP Designer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.50 ▲2.0464.81 ▲26.37
Dashboard /wp-admin3.38 ▲0.0747.36 ▼6.11
Posts /wp-admin/edit.php3.49 ▲0.1347.43 ▼0.89
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.22 ▼14.42
Media Library /wp-admin/upload.php3.30 ▲0.0740.67 ▲5.46
WP Designer /wp-admin/options-general.php?page=wp-designer3.2735.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Designer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.38 ▼0.302.00 ▼0.0440.57 ▼0.47
Dashboard /wp-admin2,199 ▲195.57 ▼0.1286.86 ▼4.7441.62 ▼2.87
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0536.64 ▼0.1336.92 ▲2.48
Add New Post /wp-admin/post-new.php1,529 ▼1117.65 ▼5.60686.49 ▲52.1054.68 ▼0.50
Media Library /wp-admin/upload.php1,407 ▲74.24 ▲0.02112.51 ▲7.9148.05 ▲2.51
WP Designer /wp-admin/options-general.php?page=wp-designer8802.0225.3449.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • wpd-settings
    • widget_recent-posts
    • 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
Good news, no errors were detected

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
Please fix the following
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-designer/lib/scssphp/tests/ExceptionTest.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-designer/wp-designer.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-designer/lib/scssphp/tests/ApiTest.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-designer/lib/scssphp/tests/Util/PathTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/wp-designer/lib/scssphp/src/Formatter/Expanded.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-designer/lib/scssphp/tests/FrameworkTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-designer/lib/scssphp/tests/Base64VLQTest.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/wp-designer/lib/scssphp/src/Formatter/Compressed.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Exception\\SassException' not found in wp-content/plugins/wp-designer/lib/scssphp/src/Exception/RangeException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'ScssPhp\\ScssPhp\\Logger\\LoggerInterface' not found in wp-content/plugins/wp-designer/lib/scssphp/src/Logger/QuietLogger.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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: customizer, wordpress designer, wordpress customizations, wp customizer, developer...

wp-designer/wp-designer.php Passed 13 tests

"WP Designer" version 2.2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
86 characters long description:
This plugin helps you to customize any WordPress site regardless of the theme you use.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected21,036 lines of code in 159 files:
LanguageFilesBlank linesComment linesLines of code
PHP443,2684,53811,383
Sass451,2541554,530
CSS43171423,627
Markdown1433101,159
JSON20096
YAML216990
HTML48073
XML25631
make211128
Bourne Shell14319

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,400)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 195)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity61.21
▷ Minimum class complexity1.00
▷ Maximum class complexity1,400.00
Average method complexity5.72
▷ Minimum method complexity1.00
▷ Maximum method complexity195.00
Code structure
Namespaces11
Interfaces2
Traits0
Classes40
▷ Abstract classes25.00%
▷ Concrete classes3895.00%
▷ Final classes2565.79%
Methods525
▷ Static methods387.24%
▷ Public methods16932.19%
▷ Protected methods203.81%
▷ Private methods33664.00%
Functions33
▷ Named functions26.06%
▷ Anonymous functions3193.94%
Constants73
▷ Global constants1013.70%
▷ Class constants6386.30%
▷ Public constants63100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
lib/scssphp/docs/img/tile.png0.24KB0.16KB▼ 31.97%