72% earnware-connect

Code Review | Earnware Connect

WordPress plugin Earnware Connect scored72%from 54 tests.

About plugin

  • Plugin page: earnware-connect
  • Plugin version: 1.0.72
  • PHP compatiblity: 7.1.8+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 19, 2017
  • Latest release: Jun 28, 2023
  • Number of updates: 87
  • Update frequency: every 23.9 days
  • Top authors: earnware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /3,619 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Earnware Connect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1423.13 ▼19.97
Dashboard /wp-admin3.46 ▲0.1246.82 ▼10.63
Posts /wp-admin/edit.php3.58 ▲0.2245.66 ▼8.49
Add New Post /wp-admin/post-new.php6.06 ▲0.1888.61 ▼39.53
Media Library /wp-admin/upload.php3.39 ▲0.1637.37 ▲1.33
Earnware Connect /wp-admin/options-general.php?page=wp-ew3.4130.86

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Earnware Connect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲16413.61 ▼0.778.87 ▲7.0141.24 ▼3.62
Dashboard /wp-admin2,217 ▲294.86 ▼1.02109.83 ▲7.1138.97 ▼4.80
Posts /wp-admin/edit.php2,097 ▲82.00 ▼0.0339.69 ▲0.1734.80 ▼1.82
Add New Post /wp-admin/post-new.php1,525 ▲623.19 ▲0.13600.33 ▼51.4754.95 ▲4.31
Media Library /wp-admin/upload.php1,399 ▲174.22 ▼0.0396.24 ▼2.9342.66 ▼2.03
Earnware Connect /wp-admin/options-general.php?page=wp-ew1,3802.2134.73132.41

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-ew
    • > Notice in wp-content/plugins/earnware-connect/admin/partials/wp-ew-admin-display.php+58
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/earnware-connect/public/partials/wp-ew-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/earnware-connect/admin/partials/wp-ew-admin-display.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: esp, contacts, earnware, crm, email

earnware-connect/wp-ew.php 85% from 13 tests

The primary PHP file in "Earnware Connect" version 1.0.72 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("earnware-connect.php" instead of "wp-ew.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
Good job! No executable or dangerous file extensions detected1,483 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP122515611,084
CSS2010204
JavaScript54186195

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected