84% sm-connect

Code Review | SmartMember Connector

WordPress plugin SmartMember Connector scored84%from 54 tests.

About plugin

  • Plugin page: sm-connect
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2
  • WordPress version: 6.3.1
  • First release: Aug 19, 2015
  • Latest release: Aug 20, 2015
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: toddnestor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /605 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.16ms] Passed 4 tests

Analyzing server-side resources used by SmartMember Connector
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.02 ▼0.54
Dashboard /wp-admin3.33 ▲0.0250.51 ▲2.04
Posts /wp-admin/edit.php3.38 ▲0.0249.52 ▼5.30
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.27 ▼4.82
Media Library /wp-admin/upload.php3.25 ▲0.0237.98 ▲3.11

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
smc_hash
db_upgraded
smc_connector
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for SmartMember Connector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.39 ▲0.041.77 ▲0.2643.25 ▼0.38
Dashboard /wp-admin2,224 ▲475.78 ▲0.1595.05 ▲2.7941.30 ▲1.81
Posts /wp-admin/edit.php2,129 ▲262.29 ▲0.2936.76 ▼4.9433.21 ▼1.13
Add New Post /wp-admin/post-new.php1,551 ▲2023.13 ▲0.10700.42 ▲88.8261.53 ▲12.04
Media Library /wp-admin/upload.php1,429 ▲294.44 ▲0.17106.44 ▲0.5345.08 ▲2.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • smc_hash
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • smc_connector

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sm-connect/api/api.php

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: smartmember, internet marketing bar, smartmember connector

sm-connect/sm-connector.php 92% from 13 tests

The main file in "SmartMember Connector" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sm-connect.php" instead of "sm-connector.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin8,802 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS3176,931
JavaScript35762071,543
SVG100229
PHP3161399

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity61.00
▷ Minimum class complexity61.00
▷ Maximum class complexity61.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png172.68KB56.63KB▼ 67.21%
screenshot-2.png30.13KB10.67KB▼ 64.59%