10% my-center-deals

Code Review | My Center Portal

WordPress plugin My Center Portal scored10%from 54 tests.

About plugin

  • Plugin page: my-center-deals
  • Plugin version: 7.11.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 27, 2018
  • Latest release: Sep 29, 2023
  • Number of updates: 277
  • Update frequency: every 6.9 days
  • Top authors: angrejkumar (97.11%)mohitinsonix (3.25%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,022 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/my-center-deals/my-center-deals.php+75
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.86MB] [CPU: ▼35.40ms] Passed 4 tests

An overview of server-side resources used by My Center Portal
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6712.51 ▼28.40
Dashboard /wp-admin3.26 ▼0.0527.66 ▼21.06
Posts /wp-admin/edit.php3.26 ▼0.1028.45 ▼19.61
Add New Post /wp-admin/post-new.php3.26 ▼2.6226.84 ▼72.54
Media Library /wp-admin/upload.php3.26 ▲0.0326.93 ▼2.13

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 815 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
mcd_settings
theysaidso_admin_options
db_upgraded
can_compress_scripts
mcd_settings-transients
widget_recent-posts
widget_recent-comments
mcd_plugin_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for My Center Portal
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9113.23 ▼0.731.56 ▼0.3037.20 ▼7.00
Dashboard /wp-admin2,226 ▲414.93 ▼0.9595.50 ▼11.0477.22 ▲35.10
Posts /wp-admin/edit.php2,111 ▲222.00 ▼0.0534.47 ▼6.3432.19 ▼3.34
Add New Post /wp-admin/post-new.php1,534 ▼817.56 ▼0.58715.77 ▲94.9166.66 ▲9.53
Media Library /wp-admin/upload.php1,410 ▲224.24 ▲0.0697.95 ▲0.6364.35 ▲18.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/my-center-deals/inc/Shortcodes.php+369
    Undefined index: deals_single_page_template
  • The uninstall procedure has failed, leaving 9 options in the database
    • mcd_settings
    • mcd_settings-transients
    • mcd_plugin_version
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 75× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/my-center-deals/templates/instagram/gallery.php:2
    • > PHP Notice
      Undefined variable: mcd_settings in wp-content/plugins/my-center-deals/assets/dynamic.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/my-center-deals/inc/redux-core/templates/panel/header.tpl.php:11
    • > PHP Notice
      Undefined variable: mcd_settings in wp-content/plugins/my-center-deals/assets/dynamic.php on line 16
    • > PHP Notice
      Undefined variable: mcd_settings in wp-content/plugins/my-center-deals/assets/dynamic.php on line 24
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/my-center-deals/templates/products/single.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/my-center-deals/inc/Shortcodes.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mcd_api_data() in wp-content/plugins/my-center-deals/templates/links/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/my-center-deals/templates/products/more-products.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/my-center-deals/templates/search/form.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === my-center-deals === )
  • Contributors: The plugin contributors field is not present
You can take inspiration from this readme.txt

my-center-deals/my-center-deals.php Passed 13 tests

The primary PHP file in "My Center Portal" version 7.11.7 is used by WordPress to initiate all plugin functionality
71 characters long description:
Show Deals, Stores & Events of a Center from mycenterportal.com portal.

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin101,814 lines of code in 547 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript19711,0559,47955,610
PHP1966,10510,22726,177
CSS1004,2457439,086
Sass36986135,760
SVG1577135,089
Markdown243083
HTML1209

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 118)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity34.60
▷ Minimum class complexity1.00
▷ Maximum class complexity263.00
Average method complexity5.51
▷ Minimum method complexity1.00
▷ Maximum method complexity118.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes131
▷ Abstract classes43.05%
▷ Concrete classes12796.95%
▷ Final classes00.00%
Methods979
▷ Static methods24024.51%
▷ Public methods73374.87%
▷ Protected methods14114.40%
▷ Private methods10510.73%
Functions57
▷ Named functions4985.96%
▷ Anonymous functions814.04%
Constants130
▷ Global constants3123.85%
▷ Class constants9976.15%
▷ Public constants99100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
40 compressed PNG files occupy 0.66MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/menu-icon.png2.66KB1.20KB▼ 54.85%
inc/redux-core/assets/img/toggle_tabs.png0.22KB0.35KB0.00%
inc/redux-core/assets/img/jquery-ui-bootstrap/ui-icons_222222_256x240.png4.10KB4.11KB0.00%
inc/redux-core/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
inc/redux-core/assets/img/jquery-ui-bootstrap/ui-icons_2e83ff_256x240.png4.10KB4.11KB0.00%