78% wpsection

Code Review | wpsection

WordPress plugin wpsection scored78%from 54 tests.

About plugin

  • Plugin page: wpsection
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 13, 2023
  • Latest release: Oct 10, 2023
  • Number of updates: 15
  • Update frequency: every 10.7 days
  • Top authors: rashid87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /377 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.68MB] [CPU: ▲1.28ms] Passed 4 tests

This is a short check of server-side resources used by wpsection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7046.33 ▲4.15
Dashboard /wp-admin3.98 ▲0.6850.70 ▲2.15
Posts /wp-admin/edit.php4.03 ▲0.6752.35 ▲4.44
Add New Post /wp-admin/post-new.php6.58 ▲0.7085.74 ▼5.62
Media Library /wp-admin/upload.php3.90 ▲0.6743.91 ▲10.92
Get Pro /wp-admin/admin.php?page=3.8736.16
Template Library /wp-admin/admin.php?page=wpsection-library3.8937.14
wpsection /wp-admin/admin.php?page=wpsection-settings3.9340.07

Server storage [IO: ▲32.02MB] [DB: ▲0.01MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Filesystem usage must be lower than 25MB (currently using 32.02MB)
Filesystem: 171 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
wpsection_api_response
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for wpsection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲21414.23 ▼0.3913.98 ▲12.0946.57 ▼2.84
Dashboard /wp-admin2,252 ▲605.89 ▲1.01100.39 ▼22.7838.42 ▼8.71
Posts /wp-admin/edit.php2,141 ▲522.23 ▲0.1833.22 ▼4.2930.30 ▼4.02
Add New Post /wp-admin/post-new.php1,563 ▲4423.33 ▲0.23655.85 ▼4.6532.80 ▼18.64
Media Library /wp-admin/upload.php1,437 ▲524.26 ▲0.07102.45 ▲2.5042.36 ▼1.25
Get Pro /wp-admin/admin.php?page=8141.8525.8824.79
Template Library /wp-admin/admin.php?page=wpsection-library1,2941.9228.8137.60
wpsection /wp-admin/admin.php?page=wpsection-settings1,6571.9726.54234.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • wpsection_api_response
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
The following issues need your attention
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpsection/theme/custompost/shop.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wpsection/plugin/adminboard/dash.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wpsection/plugin/adminboard/template-groups.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wpsection/plugin/adminboard/widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpsection/plugin/require_once/icon.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/wpsection/theme/elementor/widget/menu.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpsection/theme/custompost/banner.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/wpsection/theme/elementor/widget/popup.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/wpsection/theme/elementor/widget/accordion.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wpsection/plugin/adminboard/compare.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=wpsection-settings
    • > Network (severe)
    wp-content/plugins/wpsection/plugin/assets/widget/responsive-design - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wpsection-settings
    • > Network (severe)
    wp-content/plugins/wpsection/plugin/assets/widget/login.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wpsection-settings
    • > Network (severe)
    wp-content/plugins/wpsection/plugin/assets/widget/login.gif - Failed to load resource: the server responded with a status of 404 (Not 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
No plugin tags provided

wpsection/wpsection.php 92% from 13 tests

"wpsection" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected23,769 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
CSS72,3188112,575
PHP342,1658718,857
JavaScript105721,0742,337

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.36
▷ Minimum class complexity1.00
▷ Maximum class complexity297.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits5
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes26.45%
Methods231
▷ Static methods125.19%
▷ Public methods18780.95%
▷ Protected methods198.23%
▷ Private methods2510.82%
Functions28
▷ Named functions2382.14%
▷ Anonymous functions517.86%
Constants21
▷ Global constants1571.43%
▷ Class constants628.57%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
59 PNG files occupy 0.94MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin/assets/widget/faq.png10.95KB6.08KB▼ 44.46%
plugin/assets/widget/price.png20.44KB9.86KB▼ 51.78%
plugin/assets/widget/map.png15.24KB7.53KB▼ 50.57%
plugin/assets/widget/stars.png16.32KB8.49KB▼ 47.99%
plugin/assets/widget/shopping-cart.png13.34KB9.11KB▼ 31.70%