10% magicbox

Code Review | Wp MagicBox

WordPress plugin Wp MagicBox scored10%from 54 tests.

About plugin

  • Plugin page: magicbox
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Mar 21, 2023
  • Latest release: Apr 11, 2023
  • Number of updates: 3
  • Update frequency: every 7.0 days
  • Top authors: wpmagicbox (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /256 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+31
    Trying to get property 'categories' of non-object

Server metrics [RAM: ▼1.95MB] [CPU: ▼52.36ms] Passed 4 tests

This is a short check of server-side resources used by Wp MagicBox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.435.66 ▼35.93
Dashboard /wp-admin2.06 ▼1.247.50 ▼45.22
Posts /wp-admin/edit.php2.06 ▼1.308.46 ▼43.87
Add New Post /wp-admin/post-new.php2.06 ▼3.836.66 ▼84.42
Media Library /wp-admin/upload.php2.06 ▼1.176.02 ▼30.03
Admin Panel /wp-admin/admin.php?page=mb_admin_panel2.068.33
Security /wp-admin/admin.php?page=mb_security2.066.59
Dashboard /wp-admin/admin.php?page=magicbox2.065.77
Speed /wp-admin/admin.php?page=mb_speed2.066.44
Information /wp-admin/admin.php?page=mb_information2.066.32
Settings /wp-admin/admin.php?page=mb_settings2.066.30
Marketing /wp-admin/admin.php?page=mb_marketing2.066.15
Design /wp-admin/admin.php?page=mb_design2.066.99
Seo /wp-admin/admin.php?page=mb_seo2.066.68
Code Manager /wp-admin/admin.php?page=mb_code_manager2.066.12

Server storage [IO: ▲12.50MB] [DB: ▲0.31MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Wp MagicBox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.75 ▲0.401.69 ▲0.2145.21 ▼3.39
Dashboard /wp-admin2,258 ▲845.58 ▼0.0888.12 ▼3.1845.10 ▲4.98
Posts /wp-admin/edit.php2,163 ▲632.03 ▲0.0535.25 ▼2.3737.72 ▲0.05
Add New Post /wp-admin/post-new.php1,575 ▲4723.54 ▲0.37655.55 ▼44.9152.18 ▼2.86
Media Library /wp-admin/upload.php1,463 ▲634.22 ▲0.07110.90 ▼0.9546.63 ▼4.35
Admin Panel /wp-admin/admin.php?page=mb_admin_panel1,8522.7957.39105.54
Security /wp-admin/admin.php?page=mb_security1,7472.6356.1639.96
Dashboard /wp-admin/admin.php?page=magicbox2,9552.6040.38100.50
Speed /wp-admin/admin.php?page=mb_speed1,7252.5741.4135.19
Information /wp-admin/admin.php?page=mb_information1,7242.6235.3940.10
Settings /wp-admin/admin.php?page=mb_settings1,7522.5832.1736.55
Marketing /wp-admin/admin.php?page=mb_marketing1,6792.6132.7535.98
Design /wp-admin/admin.php?page=mb_design1,8052.5734.3939.08
Seo /wp-admin/admin.php?page=mb_seo1,9472.6234.5638.97
Code Manager /wp-admin/admin.php?page=mb_code_manager1,7522.5832.7735.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+31
    Trying to get property 'categories' of non-object
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • b984edcdfe562d3f512e5f50c1f1a1ed
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+31
    Trying to get property 'categories' of non-object
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+280
    Undefined index: action
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_admin_panel
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5d4b276e
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_admin_panel
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: mb_admin_panel
  • 490 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+133
    Undefined index: subs
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_custom_dashboard/index.php+40
    Undefined index: custom_dashboard
  • 120 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_live_search/index.php+96
    Trying to access array offset on value of type null
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_custom_login/index.php+42
    Undefined index: custom_login
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_clone_manager/index.php+44
    Undefined index: clone_manager
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_maintenance_mode/index.php+36
    Undefined index: maintenance
  • 110 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+4
    Undefined index: sub
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_login_url/index.php+53
    Undefined index: user_login_page
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_seo_image/index.php+44
    Undefined index: seo_image
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_site_redirects/index.php+48
    Undefined index: redirect
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_keyword_suggestion/index.php+42
    Undefined index: keyword_suggestion
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_comment_manager/index.php+41
    Undefined index: comment_manager
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_disqus_comment/index.php+43
    Undefined index: disqus_comment
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_custom_css/index.php+61
    Undefined index: custom_css
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/mb_live_search/index.php+96
    Undefined index: live_search
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+206
    Undefined index: is_ajax
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+5
    Undefined index: method
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+198
    Undefined variable: subModul
  • 100 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+50
    Undefined index:
    • > GET request to /wp-admin/admin.php?page=mb_admin_panel
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined property: mb_admin_panel::$subMenu
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_security
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5d69762a
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_security
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: mb_security
    • > GET request to /wp-admin/admin.php?page=mb_security
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined property: mb_security::$subMenu
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magicbox
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5d871f91
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=magicbox
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: magicbox
    • > GET request to /wp-admin/admin.php?page=magicbox
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined variable: theClass
    • > GET request to /wp-admin/admin.php?page=magicbox
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Trying to get property 'subMenu' of non-object
    • > GET request to /wp-admin/admin.php?page=magicbox
    • > Notice in wp-content/plugins/magicbox/app/moduls/main/magicbox-view.php+84
    Undefined index: auth
    • > GET request to /wp-admin/admin.php?page=magicbox
    • > Notice in wp-content/plugins/magicbox/app/moduls/main/magicbox-view.php+92
    Undefined index: end_date
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_speed
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5da609b5
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_speed
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: mb_speed
    • > GET request to /wp-admin/admin.php?page=mb_speed
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined property: mb_speed::$subMenu
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_information
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5dc34d11
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_information
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: mb_information
    • > GET request to /wp-admin/admin.php?page=mb_information
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined property: mb_information::$subMenu
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_settings
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5de04c6a
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_settings
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: mb_settings
    • > GET request to /wp-admin/admin.php?page=mb_settings
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined property: mb_settings::$subMenu
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_marketing
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5dfc7847
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_marketing
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: mb_marketing
    • > GET request to /wp-admin/admin.php?page=mb_marketing
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined property: mb_marketing::$subMenu
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_design
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5e1949d6
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_design
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: mb_design
    • > GET request to /wp-admin/admin.php?page=mb_design
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined property: mb_design::$subMenu
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_seo
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5e36609e
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_seo
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: mb_seo
    • > GET request to /wp-admin/admin.php?page=mb_seo
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined property: mb_seo::$subMenu
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/model/magicboxStaff.php+291
    Undefined index: 652da5e53e96b
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/model/magicbox.php+63
    Undefined index: mb_code_manager
    • > GET request to /wp-admin/admin.php?page=mb_code_manager
    • > Notice in wp-content/plugins/magicbox/app/moduls/masterPage.php+180
    Undefined property: mb_code_manager::$subMenu

SRP 0% 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
The following issues need your attention
  • 14× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/magicbox/system/functions/date.php
    • > /wp-content/plugins/magicbox/app/moduls/main/mb_seo-view.php
    • > /wp-content/plugins/magicbox/app/moduls/main/mb_contact-view.php
    • > /wp-content/plugins/magicbox/app/moduls/main/mb_speed-view.php
    • > /wp-content/plugins/magicbox/app/moduls/main/mb_security-view.php
    • > /wp-content/plugins/magicbox/system/functions/functions.php
    • > /wp-content/plugins/magicbox/app/moduls/main/mb_design-view.php
    • > /wp-content/plugins/magicbox/app/moduls/main/mb_faq-view.php
    • > /wp-content/plugins/magicbox/app/moduls/main/mb_information-view.php
    • > /wp-content/plugins/magicbox/app/moduls/main/mb_settings-view.php
  • 114× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function postTypes() on null in wp-content/plugins/magicbox/app/moduls/mb_comment_manager/view/index.php:2
    • > PHP Notice
      Undefined variable: categories in wp-content/plugins/magicbox/app/moduls/main/mb_security-view.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/magicbox/app/moduls/mb_keyword_suggestion/view/index.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/magicbox/app/moduls/mb_visit_limitation/view/index.php:1
    • > PHP Warning
      include_once(): Failed opening 'app/moduls/index.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/magicbox/system/core.php on line 34
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/magicbox/app/moduls/main/mb_information-view.php on line 9
    • > PHP Notice
      Undefined variable: _mb_url_ in wp-content/plugins/magicbox/system/core.php on line 15
    • > PHP Notice
      Undefined variable: _mb_url_ in wp-content/plugins/magicbox/system/core.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/magicbox/app/moduls/mb_form_builder/view/index.php on line 2
    • > PHP Notice
      Undefined variable: _mb_dir_ in wp-content/plugins/magicbox/system/core.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (jpg), #2 (jpg), #3 (jpg), #4 (jpg), #5 (jpg), #6 (jpg), #7 (jpg), #8 (jpg), #9 (jpg), #10 (jpg), #11 (jpg), #12 (jpg), #13 (jpg), #14 (jpg), #15 (jpg), #16 (jpg), #17 (jpg), #18 (jpg), #19 (jpg), #20 (jpg), #21 (jpg), #22 (jpg), #23 (jpg), #24 (jpg), #25 (jpg), #26 (jpg), #27 (jpg), #28 (jpg), #29 (jpg), #30 (jpg), #31 (jpg), #32 (jpg), #33 (jpg), #34 (jpg), #35 (jpg), #36 (jpg), #37 (jpg), #38 (jpg), #39 (jpg), #40 (jpg), #41 (jpg), #42 (jpg), #43 (jpg), #44 (jpg), #45 (jpg), #46 (jpg), #47 (jpg), #48 (jpg), #49 (jpg), #50 (jpg), #51 (jpg)
  • Tags: Please delete some tags, you are using 58 tag instead of maximum 10
The official readme.txt might help

magicbox/index.php 92% from 13 tests

The main PHP file in "Wp MagicBox" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("magicbox.php" instead of "index.php")

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
No dangerous file extensions were detected76,319 lines of code in 178 files:
LanguageFilesBlank linesComment linesLines of code
CSS293,68719743,920
JavaScript184,7341,85916,113
PHP1253,22418814,050
PO File18221,2931,847
SVG390256
SQL13687129
HTML1104

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity9.30
▷ Minimum class complexity2.00
▷ Maximum class complexity85.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes63
▷ Abstract classes00.00%
▷ Concrete classes63100.00%
▷ Final classes00.00%
Methods305
▷ Static methods00.00%
▷ Public methods28894.43%
▷ Protected methods72.30%
▷ Private methods103.28%
Functions34
▷ Named functions2058.82%
▷ Anonymous functions1441.18%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
116 compressed PNG files occupy 0.23MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon/bulk-mail.png3.83KB2.33KB▼ 39.16%
assets/icon/smtp.png1.90KB1.93KB0.00%
assets/icon/social/cb1/dailymotion.png1.94KB1.63KB▼ 16.28%
assets/icon/duplicate-manager.png2.08KB2.10KB0.00%
assets/icon/seo-image.png2.54KB2.57KB0.00%