84% molongui-bump-offer

Code Review | Molongui Deals, Sales Promotions and Upsells For WooCommerce

WordPress plugin Molongui Deals, Sales Promotions and Upsells For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: molongui-bump-offer
  • Plugin version: 2.4.8
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 4, 2019
  • Latest release: Nov 7, 2023
  • Number of updates: 73
  • Update frequency: every 24.3 days
  • Top authors: Molongui (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

800+ active /16,694 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
Installer ran successfully

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

Server-side resources used by Molongui Deals, Sales Promotions and Upsells For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.82 ▼7.14
Dashboard /wp-admin3.32 ▲0.0247.43 ▼3.74
Posts /wp-admin/edit.php3.37 ▲0.0248.34 ▲2.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.06 ▼8.52
Media Library /wp-admin/upload.php3.24 ▲0.0237.45 ▲4.99

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Molongui Deals, Sales Promotions and Upsells For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲1614.25 ▼0.111.69 ▼0.6144.28 ▲0.74
Dashboard /wp-admin2,208 ▲285.62 ▲0.0485.29 ▼4.5139.66 ▼0.93
Posts /wp-admin/edit.php2,113 ▲132.08 ▲0.1036.10 ▼3.7732.14 ▼3.01
Add New Post /wp-admin/post-new.php1,539 ▲1322.98 ▼0.09637.22 ▼2.4057.84 ▲4.50
Media Library /wp-admin/upload.php1,407 ▲104.22 ▲0.02103.74 ▲3.0944.30 ▲3.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • molongui_bump_offer_db_version
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • molongui_bump_offer_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 45× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: defaults in wp-content/plugins/molongui-bump-offer/views/bump/html-layout-1.php on line 5
    • > PHP Notice
      Undefined variable: box_no_bg in wp-content/plugins/molongui-bump-offer/views/bump/html-layout-1.php on line 67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/molongui-bump-offer/views/bump/html-admin-settings-metabox.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/molongui-bump-offer/views/bump/html-layout-1.php on line 3
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/molongui-bump-offer/views/bump/html-layout-1.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpautop() in wp-content/plugins/molongui-bump-offer/views/bump/html-layout-1.php:139
    • > PHP Notice
      Undefined variable: defaults in wp-content/plugins/molongui-bump-offer/views/bump/html-layout-1.php on line 97
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/molongui-bump-offer/views/bump/html-layout-1.php on line 5
    • > PHP Notice
      Undefined variable: is_preview in wp-content/plugins/molongui-bump-offer/views/bump/html-layout-1.php on line 5
    • > PHP Notice
      Undefined variable: lead_arrow_icon in wp-content/plugins/molongui-bump-offer/views/bump/html-layout-1.php on line 70

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (18 tag instead of maximum 10)
Please take inspiration from this readme.txt

molongui-bump-offer/molongui-bump-offer.php 92% from 13 tests

The primary PHP file in "Molongui Deals, Sales Promotions and Upsells For WooCommerce" version 2.4.8 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7.0" instead of "5.2.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin22,579 lines of code in 173 files:
LanguageFilesBlank linesComment linesLines of code
PHP11389294012,099
JavaScript221,1477835,045
PO File71,7222,5174,368
SVG100565
CSS266453426
XML20055
Markdown27021

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity32.31
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes26
▷ Abstract classes27.69%
▷ Concrete classes2492.31%
▷ Final classes14.17%
Methods256
▷ Static methods93.52%
▷ Public methods12548.83%
▷ Protected methods10239.84%
▷ Private methods2911.33%
Functions232
▷ Named functions21793.53%
▷ Anonymous functions156.47%
Constants94
▷ Global constants66.38%
▷ Class constants8893.62%
▷ Public constants88100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
29 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
customizer/common/img/text-align/text-align-left.png0.32KB0.18KB▼ 43.64%
customizer/common/img/font-style/font-style-overline.png0.44KB0.24KB▼ 45.31%
customizer/common/img/font-case/box-tabs-position-top-full.png0.63KB0.35KB▼ 44.34%
customizer/common/img/font-style/font-style-normal.png0.40KB0.25KB▼ 37.75%
customizer/common/img/font-style/font-style-underline.png0.41KB0.22KB▼ 45.95%