10% wp-snakemember-integration

Code Review | WP Snakemember Integration

WordPress plugin WP Snakemember Integration scored10%from 54 tests.

About plugin

  • Plugin page: wp-snakemember-in...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 1, 2014
  • Latest release: Apr 26, 2023
  • Number of updates: 57
  • Update frequency: every 54.0 days
  • Top authors: snakemember (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,839 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wp-snakemember-integration/wp_snake_member.php+12
    Undefined variable: wpdb

Server metrics [RAM: ▲0.21MB] [CPU: ▼17.76ms] Passed 4 tests

Server-side resources used by WP Snakemember Integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.40 ▲0.9446.55 ▲7.52
Dashboard /wp-admin4.22 ▲0.8852.45 ▼9.73
Posts /wp-admin/edit.php4.28 ▲0.9246.21 ▲2.91
Add New Post /wp-admin/post-new.php4.01 ▼1.8837.11 ▼71.72
Media Library /wp-admin/upload.php4.15 ▲0.9243.34 ▲8.90

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 140 new files
Database: 1 new table, 9 new options
New tables
wp_sm_object_permissions
New WordPress options
db_upgraded
widget_recent-posts
wp_sm_table_db_version
theysaidso_admin_options
widget_recent-comments
widget_snakemember_webforms_widget
widget_theysaidso_widget
can_compress_scripts
widget_snakemembercampaigns_widget

Browser metrics Passed 4 tests

WP Snakemember Integration: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.22 ▼0.334.46 ▲2.8443.65 ▼1.10
Dashboard /wp-admin2,201 ▲245.65 ▲0.0787.12 ▼2.1275.42 ▲39.37
Posts /wp-admin/edit.php2,121 ▲212.08 ▲0.0739.79 ▼4.0436.89 ▲0.78
Add New Post /wp-admin/post-new.php1,553 ▲1818.29 ▼0.07669.42 ▲47.0056.28 ▼8.47
Media Library /wp-admin/upload.php1,415 ▲154.24 ▲0.0699.46 ▼5.8678.41 ▲34.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-snakemember-integration/affiliate_tracking/affiliate_tracking.php+29
    Undefined index: path
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_sm_object_permissions
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • widget_snakemember_webforms_widget
    • theysaidso_admin_options
    • wp_sm_table_db_version
    • widget_recent-posts
    • widget_snakemembercampaigns_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 120× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPUnit/Framework/TestCase.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-snakemember-integration/lib/ActiveRecordLib/test/helpers/config.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveRecord\\Model' not found in wp-content/plugins/wp-snakemember-integration/lib/ActiveRecordLib/test/models/Book.php:2
    • > PHP Notice
      Undefined index: user_email in wp-content/plugins/wp-snakemember-integration/autolog.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPUnit/Framework/TestCase.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-snakemember-integration/lib/ActiveRecordLib/test/helpers/config.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'SnakeCase_PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-snakemember-integration/lib/ActiveRecordLib/test/helpers/DatabaseTest.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPUnit/Framework/TestCase.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-snakemember-integration/lib/ActiveRecordLib/test/helpers/config.php on line 14
    • > PHP Warning
      require_once(PHPUnit/Framework/TestCase.php): failed to open stream: No such file or directory in wp-content/plugins/wp-snakemember-integration/lib/ActiveRecordLib/test/helpers/config.php on line 14
    • > PHP Warning
      require_once(PHPUnit/Framework/TestCase.php): failed to open stream: No such file or directory in wp-content/plugins/wp-snakemember-integration/lib/ActiveRecordLib/test/helpers/config.php on line 14
    • > PHP Warning
      require_once(PHPUnit/Framework/TestCase.php): failed to open stream: No such file or directory in wp-content/plugins/wp-snakemember-integration/lib/ActiveRecordLib/test/helpers/config.php on line 14
    • > PHP Warning
      require_once(PHPUnit/Framework/TestCase.php): failed to open stream: No such file or directory in wp-content/plugins/wp-snakemember-integration/lib/ActiveRecordLib/test/helpers/config.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: marketing, xmlrpc, integration, snakemember

wp-snakemember-integration/wp_snake_member.php 92% from 13 tests

The principal PHP file in "WP Snakemember Integration" v. 2.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-snakemember-integration.php" instead of "wp_snake_member.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin12,610 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
PHP1062,6923,34511,146
JavaScript318231815
SQL6591361
PO File15457127
Markdown135094
CSS216067

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.02
▷ Minimum class complexity1.00
▷ Maximum class complexity154.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes118
▷ Abstract classes54.24%
▷ Concrete classes11395.76%
▷ Final classes00.00%
Methods1,052
▷ Static methods555.23%
▷ Public methods97592.68%
▷ Protected methods191.81%
▷ Private methods585.51%
Functions174
▷ Named functions12471.26%
▷ Anonymous functions5028.74%
Constants13
▷ Global constants430.77%
▷ Class constants969.23%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/snakem_favicon_128.png9.79KB3.45KB▼ 64.77%
images/logo.png17.74KB0.70KB▼ 96.06%
images/logo_black.png1.36KB0.70KB▼ 48.75%