83% welight-easy-impact

Code Review | Welight - Easy Impact

WordPress plugin Welight - Easy Impact scored83%from 54 tests.

About plugin

  • Plugin page: welight-easy-impact
  • Plugin version: 0.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.0.1
  • WordPress version: 6.3.1
  • First release: Aug 16, 2018
  • Latest release: Dec 14, 2018
  • Number of updates: 12
  • Update frequency: every 29.1 days
  • Top authors: welight (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /710 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.36ms] Passed 4 tests

This is a short check of server-side resources used by Welight - Easy Impact
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.71 ▲3.50
Dashboard /wp-admin3.31 ▼0.0454.33 ▼11.59
Posts /wp-admin/edit.php3.36 ▲0.0046.91 ▼0.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.49 ▼12.99
Media Library /wp-admin/upload.php3.23 ▲0.0039.38 ▲5.46

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Welight - Easy Impact
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.001.80 ▼0.1643.39 ▼0.45
Dashboard /wp-admin2,195 ▲155.52 ▼0.1999.26 ▲1.4943.92 ▼1.49
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0035.69 ▼0.4233.27 ▼6.01
Add New Post /wp-admin/post-new.php1,549 ▲1823.30 ▲0.22666.93 ▼18.4560.34 ▼7.73
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.12101.82 ▼2.5443.23 ▼1.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/welight-easy-impact/includes/admin/class-we-admin-settings.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/welight-easy-impact/includes/admin/class-we-admin-settings.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welight-easy-impact/includes/class-we-abondoned-cart.php:49
    • > PHP Warning
      Use of undefined constant WELIGHTEI_INCLUDES_PATH - assumed 'WELIGHTEI_INCLUDES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/welight-easy-impact/includes/we-core-functions.php on line 10
    • > PHP Warning
      require_once(WELIGHTEI_INCLUDES_PATHwe-api-functions.php): failed to open stream: No such file or directory in wp-content/plugins/welight-easy-impact/includes/we-core-functions.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welight-easy-impact/includes/we-template-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function welight() in wp-content/plugins/welight-easy-impact/includes/admin/class-welight-admin.php:20
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/welight-easy-impact/templates/carousel/welight-default.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function welightei_get_api_auth() in wp-content/plugins/welight-easy-impact/includes/class-we-ong.php:49
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/welight-easy-impact/templates/carousel/welight-simple.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Configuration Screen.)
Please take inspiration from this readme.txt

welight-easy-impact/welight-easy-impact.php 85% from 13 tests

The main file in "Welight - Easy Impact" v. 0.5.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "3.1")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected2,667 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP244371,1041,405
CSS29127588
Sass4694424
JavaScript52332128
SVG10052
JSON10031
Markdown115030
XML1239

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.89
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods58
▷ Static methods11.72%
▷ Public methods3662.07%
▷ Protected methods00.00%
▷ Private methods2237.93%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants26
▷ Global constants26100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.41MB with 0.26MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png419.21KB156.33KB▼ 62.71%