83% wpmktgengine

Code Review | WPMktgEngine

WordPress plugin WPMktgEngine scored83%from 54 tests.

About plugin

  • Plugin page: wpmktgengine
  • Plugin version: 4.0.20
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 20, 2015
  • Latest release: Apr 21, 2023
  • Number of updates: 187
  • Update frequency: every 14.5 days
  • Top authors: Genoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /12,934 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▲837.50ms] 50% from 4 tests

A check of server-side resources used by WPMktgEngine
Please take the time to fix the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,273.89ms on /wp-admin/admin.php?page=WPMKTENGINELogin)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 837.50ms on /wp-admin/admin.php?page=WPMKTENGINELogin)
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3144.68 ▲5.52
Dashboard /wp-admin3.58 ▲0.281,212.09 ▲1,161.64
Posts /wp-admin/edit.php3.62 ▲0.271,146.20 ▲1,104.44
Add New Post /wp-admin/post-new.php6.12 ▲0.231,228.82 ▲1,132.82
Media Library /wp-admin/upload.php3.43 ▲0.201,138.01 ▲1,107.20
Settings /wp-admin/admin.php?page=WPMKTENGINE3.431,162.88
Login /wp-admin/admin.php?page=WPMKTENGINELogin3.401,273.89

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 236 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
WPMKTENGINECTA
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPMktgEngine
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8213.27 ▼1.251.85 ▲0.1742.16 ▼2.22
Dashboard /wp-admin2,242 ▲655.73 ▲0.1283.85 ▼16.5238.16 ▼6.19
Posts /wp-admin/edit.php2,142 ▲392.38 ▲0.3933.60 ▼10.9633.35 ▲2.20
Add New Post /wp-admin/post-new.php1,568 ▲3323.23 ▲5.15632.18 ▼9.2634.92 ▼40.04
Media Library /wp-admin/upload.php1,457 ▲574.49 ▲0.29104.44 ▲1.2543.35 ▲1.26
Settings /wp-admin/admin.php?page=WPMKTENGINE8662.0928.0528.33
Login /wp-admin/admin.php?page=WPMKTENGINELogin1,1892.8445.5054.43

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 7 options in the database
    • db_upgraded
    • WPMKTENGINECTA
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 62× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHWPINC/class-wp-customize-setting.php): failed to open stream: No such file or directory in wp-content/plugins/wpmktgengine/libs/WPME/Customizer/CustomizerSetting.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'WPMKTENGINE\\TemplateRenderer' not found in wp-content/plugins/wpmktgengine/libs/WPME/Extensions/TemplateRenderer.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WPME\\Extensions\\Shortcodes\\Base' not found in wp-content/plugins/wpmktgengine/libs/WPME/Extensions/Shortcodes/Form.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/wpmktgengine/libs/WPME/Extensions/ElementorShortcodes/ElementorShortcodesCta.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpmktgengine/libs/WPME/Extensions/GuttenbergShortcodes/form/index.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpmktgengine/libs/WPME/Extensions/GuttenbergShortcodes/survey/index.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WPMKTENGINE\\Wordpress\\Metabox' not found in wp-content/plugins/wpmktgengine/libs/WPMKTENGINE/Wordpress/MetaboxStyles.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WPMKTENGINE\\Wordpress\\Metabox' not found in wp-content/plugins/wpmktgengine/libs/WPMKTENGINE/Wordpress/MetaboxArea.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WPME\\WPApi\\Base' not found in wp-content/plugins/wpmktgengine/libs/WPME/WPApi/Forms.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WPMKTENGINE\\WidgetCTA' not found in wp-content/plugins/wpmktgengine/libs/WPMKTENGINE/WidgetCTADynamic.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #5, #6, #7 in wpmktgengine/assets to your readme.txt
Please take inspiration from this readme.txt

wpmktgengine/wpmktgengine.php Passed 13 tests

The main PHP file in "WPMktgEngine" ver. 4.0.20 adds more information about the plugin and also serves as the entry point for this plugin
10 characters long description:
Genoo, LLC

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
Success! There were no dangerous files found in this plugin28,385 lines of code in 184 files:
LanguageFilesBlank linesComment linesLines of code
PHP1653,30611,66921,592
JavaScript126711,2684,954
CSS61251451,838
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity24.45
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity87.00
Code structure
Namespaces22
Interfaces1
Traits0
Classes132
▷ Abstract classes75.30%
▷ Concrete classes12594.70%
▷ Final classes00.00%
Methods1,202
▷ Static methods34128.37%
▷ Public methods1,14595.26%
▷ Protected methods211.75%
▷ Private methods363.00%
Functions84
▷ Named functions910.71%
▷ Anonymous functions7589.29%
Constants121
▷ Global constants3428.10%
▷ Class constants8771.90%
▷ Public constants87100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
21 PNG files occupy 1.59MB with 0.99MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/bgTinyMCECTA.png1.21KB0.61KB▼ 49.80%
assets/bgMenuIconSingle.png0.75KB0.48KB▼ 36.67%
assets/logo.png47.25KB16.11KB▼ 65.92%
screenshot-6.png135.95KB48.14KB▼ 64.59%
assets/screenshot.png2.76KB0.13KB▼ 95.48%