73% cf7-spreadsheets

Code Review | CF7 Spreadsheets

WordPress plugin CF7 Spreadsheets scored73%from 54 tests.

About plugin

  • Plugin page: cf7-spreadsheets
  • Plugin version: 2.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Jan 5, 2017
  • Latest release: Dec 29, 2020
  • Number of updates: 48
  • Update frequency: every 30.4 days
  • Top authors: moshensky (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

700+ active /9,858 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
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.70ms] Passed 4 tests

An overview of server-side resources used by CF7 Spreadsheets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2743.96 ▲4.32
Dashboard /wp-admin3.44 ▲0.1344.44 ▼3.48
Posts /wp-admin/edit.php3.55 ▲0.1948.42 ▲0.29
Add New Post /wp-admin/post-new.php6.04 ▲0.1591.03 ▼8.87
Media Library /wp-admin/upload.php3.36 ▲0.1335.58 ▲1.25

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4,906 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for CF7 Spreadsheets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲7213.22 ▼1.474.36 ▲2.6539.04 ▼0.19
Dashboard /wp-admin2,224 ▲325.87 ▲0.9498.67 ▼9.7939.64 ▼5.40
Posts /wp-admin/edit.php2,110 ▲212.04 ▼0.0040.61 ▲1.6036.06 ▲2.13
Add New Post /wp-admin/post-new.php1,536 ▲618.48 ▼4.86615.06 ▼65.1858.23 ▼2.61
Media Library /wp-admin/upload.php1,409 ▲244.27 ▲0.0798.78 ▼1.3844.34 ▲1.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'uninstall' not found or invalid function name
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4095× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/Script/ExecutionResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/ServiceBroker/GoogleIamV1Policy.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/Storagetransfer/Date.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/Slides/VideoProperties.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/PeopleService/Event.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/ToolResults/Image.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/YouTubeReporting/Resource/JobsReports.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/SQLAdmin/IpConfiguration.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/Storagetransfer/TransferOperation.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/cf7-spreadsheets/vendor/google/apiclient-services/src/Google/Service/YouTube/PromotedItem.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === cf7-spreadsheets === )
You can look at the official readme.txt

cf7-spreadsheets/CF7-spreadsheets.php 85% from 13 tests

Analyzing the main PHP file in "CF7 Spreadsheets" version 2.3.2
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cf7-spreadsheets.php" instead of "CF7-spreadsheets.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis 97% from 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
No dangerous file extensions were detected304,266 lines of code in 4,868 files:
LanguageFilesBlank linesComment linesLines of code
PHP4,80318,591148,382297,626
Markdown341,57004,862
JSON19001,279
JavaScript172145
YAML419097
PO File1383894
CSS118090
XML47064
make1409

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.25
▷ Minimum class complexity1.00
▷ Maximum class complexity628.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
Namespaces38
Interfaces28
Traits6
Classes4,794
▷ Abstract classes100.21%
▷ Concrete classes4,78499.79%
▷ Final classes100.21%
Methods33,979
▷ Static methods1500.44%
▷ Public methods33,50798.61%
▷ Protected methods2110.62%
▷ Private methods2610.77%
Functions265
▷ Named functions7227.17%
▷ Anonymous functions19372.83%
Constants828
▷ Global constants212.54%
▷ Class constants80797.46%
▷ Public constants807100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png51.04KB19.67KB▼ 61.46%