78% surbma-premium-wp

Code Review | Surbma | Premium WP

WordPress plugin Surbma | Premium WP scored78%from 54 tests.

About plugin

  • Plugin page: surbma-premium-wp
  • Plugin version: 8.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Aug 31, 2023
  • Number of updates: 89
  • Update frequency: every 32.4 days
  • Top authors: Surbma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,149 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.83ms] Passed 4 tests

An overview of server-side resources used by Surbma | Premium WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.70 ▼5.66
Dashboard /wp-admin3.34 ▲0.0451.42 ▼7.09
Posts /wp-admin/edit.php3.40 ▲0.0450.41 ▼0.60
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.70 ▼9.96
Media Library /wp-admin/upload.php3.27 ▲0.0437.33 ▲0.44
Google Analytics /wp-admin/admin.php?page=surbma-premium-wp-google-analytics3.2132.45
Premium WP /wp-admin/admin.php?page=surbma-premium-wp-menu3.2334.31
Extra Content /wp-admin/admin.php?page=surbma-premium-wp-extra-fields3.2134.02
Google Tag Manager /wp-admin/admin.php?page=surbma-premium-wp-google-tag-manager3.2130.98
Extra Shortcodes /wp-admin/admin.php?page=surbma-premium-wp-shortcodes3.2335.13
Social Integration /wp-admin/admin.php?page=surbma-premium-wp-social3.2132.70

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

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

Browser metrics Passed 4 tests

Surbma | Premium WP: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.72 ▲0.161.80 ▼0.5245.40 ▲1.68
Dashboard /wp-admin2,240 ▲605.61 ▼0.0688.00 ▼1.9539.36 ▼2.13
Posts /wp-admin/edit.php2,145 ▲422.04 ▲0.0835.29 ▼0.1030.40 ▼5.48
Add New Post /wp-admin/post-new.php1,567 ▲3023.17 ▲4.98671.16 ▲21.2049.24 ▼12.53
Media Library /wp-admin/upload.php1,448 ▲484.20 ▲0.0697.77 ▼0.4743.67 ▲2.24
Google Analytics /wp-admin/admin.php?page=surbma-premium-wp-google-analytics1,0592.0025.1454.27
Premium WP /wp-admin/admin.php?page=surbma-premium-wp-menu9822.0224.7830.37
Extra Content /wp-admin/admin.php?page=surbma-premium-wp-extra-fields1,3002.0022.1143.27
Google Tag Manager /wp-admin/admin.php?page=surbma-premium-wp-google-tag-manager1,0541.9922.3431.92
Extra Shortcodes /wp-admin/admin.php?page=surbma-premium-wp-shortcodes3,0422.0026.7549.52
Social Integration /wp-admin/admin.php?page=surbma-premium-wp-social1,1752.0024.6232.26

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=surbma-premium-wp-social
    • > Notice in wp-content/plugins/surbma-premium-wp/pages/social-page.php+143
    Trying to access array offset on value of type bool

SRP 50% 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 fix the following
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-premium-wp/pages/social-page.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-premium-wp/lib/admin.php:70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/surbma-premium-wp/lib/shortcodes.php:3
    • > PHP Warning
      include_once(): Failed opening 'SURBMA_PREMIUM_WP_PLUGIN_DIR/pages/google-analytics-page.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/surbma-premium-wp/lib/admin.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'SURBMA_PREMIUM_WP_PLUGIN_DIR/pages/start-page.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/surbma-premium-wp/lib/admin.php on line 3
    • > PHP Warning
      include_once(SURBMA_PREMIUM_WP_PLUGIN_DIR/pages/google-analytics-page.php): failed to open stream: No such file or directory in wp-content/plugins/surbma-premium-wp/lib/admin.php on line 4
    • > PHP Warning
      Use of undefined constant SURBMA_PREMIUM_WP_PLUGIN_DIR - assumed 'SURBMA_PREMIUM_WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/surbma-premium-wp/lib/admin.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-premium-wp/pages/google-tag-manager-page.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-premium-wp/lib/frontend.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-premium-wp/pages/extra-fields-page.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
You can take inspiration from this readme.txt

surbma-premium-wp/surbma-premium-wp.php Passed 13 tests

Analyzing the main PHP file in "Surbma | Premium WP" version 8.3
45 characters long description:
Useful extensions for your WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,934 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP10156351,779
PO File13812195
CSS24049
SVG8008
Markdown1103

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions65
▷ Named functions2843.08%
▷ Anonymous functions3756.92%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin