74% surferseo

Code Review | Surfer – WordPress Plugin

WordPress plugin Surfer – WordPress Plugin scored74%from 54 tests.

About plugin

  • Plugin page: surferseo
  • Plugin version: 1.3.3.379
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2022
  • Latest release: Nov 15, 2023
  • Number of updates: 16
  • Update frequency: every 23.6 days
  • Top authors: surferseo (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

6,000+ active /43,929 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.63ms] Passed 4 tests

This is a short check of server-side resources used by Surfer – WordPress Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.95 ▼0.15
Dashboard /wp-admin3.43 ▲0.1247.57 ▼4.83
Posts /wp-admin/edit.php3.58 ▲0.2252.06 ▲4.44
Add New Post /wp-admin/post-new.php6.06 ▲0.1789.61 ▼0.57
Media Library /wp-admin/upload.php3.35 ▲0.1234.76 ▲3.05
Surfer Setup Wizard /wp-admin/admin.php?page=setup-surfer-wizard3.3635.10

Server storage [IO: ▲5.43MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 82 new files
Database: 1 new table, 8 new options
New tables
wp_surfer_gsc_traffic
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
surfer_version
can_compress_scripts
surfer_available_locations
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Surfer – WordPress Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8214.23 ▼0.131.72 ▼0.0042.22 ▼1.50
Dashboard /wp-admin2,252 ▲875.68 ▲0.1396.46 ▼0.8443.44 ▼4.91
Posts /wp-admin/edit.php2,197 ▲9713.73 ▲11.77364.80 ▲327.20125.55 ▲88.95
Add New Post /wp-admin/post-new.php1,411 ▼11518.57 ▼4.54641.65 ▼58.3526.94 ▼29.37
Media Library /wp-admin/upload.php1,455 ▲554.27 ▲0.0585.22 ▼11.0141.64 ▼0.12
Surfer Setup Wizard /wp-admin/admin.php?page=setup-surfer-wizard8892.0525.0031.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_surfer_gsc_traffic
  • Zombie WordPress options were found after uninstall: 8 options
    • surfer_version
    • surfer_available_locations
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Trait 'SurferSEO\\Surfer\\GSC\\Surfer_GSC_Common' not found in wp-content/plugins/surferseo/includes/surfer/gsc/class-surfer-gsc-notifications.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/surferseo/templates/admin/wizard.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/surferseo/templates/admin/settings.php:13
    • > PHP Fatal error
      Trait 'SurferSEO\\Surfer\\GSC\\Surfer_GSC_Common' not found in wp-content/plugins/surferseo/includes/surfer/gsc/class-surfer-gsc-drop-monitor.php on line 15
    • > PHP Fatal error
      Trait 'SurferSEO\\Surfer\\GSC\\Surfer_GSC_Common' not found in wp-content/plugins/surferseo/includes/surfer/class-surfer-gsc.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/surferseo/templates/admin/performance-report.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'SurferSEO\\Forms\\Fields\\Surfer_Form_Element' not found in wp-content/plugins/surferseo/includes/forms/fields/class-surfer-form-element-text.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'SurferSEO\\Forms\\Fields\\Surfer_Form_Element' not found in wp-content/plugins/surferseo/includes/forms/fields/class-surfer-form-element-label.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'SurferSEO\\Forms\\Validators\\Surfer_Validator_Interface' not found in wp-content/plugins/surferseo/includes/forms/validators/class-validator-is-required.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'SurferSEO\\Forms\\Fields\\Surfer_Form_Element' not found in wp-content/plugins/surferseo/includes/forms/fields/class-surfer-form-element-textarea.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #3, #4 in surferseo/assets to your readme.txt
Please take inspiration from this readme.txt

surferseo/surferseo.php 92% from 13 tests

"Surfer – WordPress Plugin" version 1.3.3.379's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin47,127 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript46,31818,80940,415
PHP401,3552,2814,377
CSS439172,299
SVG50029
JSON1007

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.21
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces9
Interfaces1
Traits1
Classes31
▷ Abstract classes39.68%
▷ Concrete classes2890.32%
▷ Final classes00.00%
Methods299
▷ Static methods82.68%
▷ Public methods19264.21%
▷ Protected methods124.01%
▷ Private methods9531.77%
Functions16
▷ Named functions743.75%
▷ Anonymous functions956.25%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ 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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/emails/eye.png1.38KB0.67KB▼ 51.94%
assets/images/emails/cursor-arrow-rays.png1.02KB0.54KB▼ 47.36%
assets/images/emails/surfer_logo.png4.53KB3.02KB▼ 33.28%