79% perfectwpthemes-toolkit

Code Review | Perfectwpthemes Toolkit

WordPress plugin Perfectwpthemes Toolkit scored79%from 54 tests.

About plugin

  • Plugin page: perfectwpthemes-t...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.1
  • WordPress version: 6.3.1
  • First release: Dec 27, 2018
  • Latest release: May 22, 2023
  • Number of updates: 7
  • Update frequency: every 230.7 days
  • Top authors: perfectwpthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /6,855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▲0.65ms] Passed 4 tests

A check of server-side resources used by Perfectwpthemes Toolkit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2642.34 ▲2.18
Dashboard /wp-admin3.57 ▲0.2748.13 ▲0.68
Posts /wp-admin/edit.php3.62 ▲0.2749.91 ▲1.96
Add New Post /wp-admin/post-new.php6.11 ▲0.2290.25 ▼2.20
Media Library /wp-admin/upload.php3.43 ▲0.2036.71 ▲3.35

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 95 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Perfectwpthemes Toolkit
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲11613.68 ▼0.885.41 ▲3.4541.00 ▼2.19
Dashboard /wp-admin2,213 ▲255.86 ▲0.93100.77 ▼5.0538.88 ▼3.74
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0036.52 ▼5.0638.14 ▲1.94
Add New Post /wp-admin/post-new.php1,518 ▲417.49 ▼0.15664.94 ▼57.7153.84 ▲1.37
Media Library /wp-admin/upload.php1,395 ▲44.22 ▼0.0593.71 ▼0.5241.20 ▼2.09

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_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/perfectwpthemes-toolkit/public/partials/perfectwpthemes-toolkit-public-display.php
    • > /wp-content/plugins/perfectwpthemes-toolkit/admin/partials/perfectwpthemes-toolkit-admin-display.php
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/perfectwpthemes-toolkit/includes/themes/glaze-blog/widgets/instagram-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PWPT_Importer_Logger' not found in wp-content/plugins/perfectwpthemes-toolkit/includes/demo-importer/importer/class-pwpt-importer-logger-cli.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/perfectwpthemes-toolkit/includes/themes/masonry-blog-pro/info.php:93
    • > PHP Fatal error
      require(): Failed opening required 'PWPT_ABSPATHincludes/demo-importer/importer/class-pwpt-importer-logger.php' (include_path='.:/usr/share/php') in wp-content/plugins/perfectwpthemes-toolkit/includes/demo-importer/class-pwpt-logger.php on line 9
    • > PHP Warning
      require(PWPT_ABSPATHincludes/demo-importer/importer/class-pwpt-importer-logger.php): failed to open stream: No such file or directory in wp-content/plugins/perfectwpthemes-toolkit/includes/demo-importer/class-pwpt-logger.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/perfectwpthemes-toolkit/includes/customizer/controls/class-customizer-toggle-control.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/perfectwpthemes-toolkit/includes/themes/glaze-blog-lite/customizer/functions/dynamic-style.php:100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/perfectwpthemes-toolkit/includes/themes/glaze-blog/info.php:90
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/perfectwpthemes-toolkit/includes/customizer/controls/class-customizer-radio-image-control.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PWPT_Importer_WXR_Importer' not found in wp-content/plugins/perfectwpthemes-toolkit/includes/demo-importer/class-pwpt-wxr-importer.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: import, demo, content, data, perfectwpthemes...

perfectwpthemes-toolkit/perfectwpthemes-toolkit.php Passed 13 tests

This is the main PHP file of "Perfectwpthemes Toolkit" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
56 characters long description:
An essential toolkit for themes made by perfectwpthemes.

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 detected8,988 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP672,1462,7186,478
JavaScript81941541,539
CSS623555971

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity18.02
▷ Minimum class complexity1.00
▷ Maximum class complexity262.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes41
▷ Abstract classes12.44%
▷ Concrete classes4097.56%
▷ Final classes25.00%
Methods243
▷ Static methods4217.28%
▷ Public methods16969.55%
▷ Protected methods3413.99%
▷ Private methods4016.46%
Functions65
▷ Named functions6498.46%
▷ Anonymous functions11.54%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/customizer/assets/imgs/color-picker-transparency-grid.png2.58KB2.80KB0.00%
includes/customizer/assets/css/chosen-sprite.png0.53KB0.88KB0.00%
includes/customizer/assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
includes/theme-info/images/perfectwpthemes.png11.03KB6.60KB▼ 40.15%