67% mageewp-page-layout

Code Review | Mageewp Page Layout

WordPress plugin Mageewp Page Layout scored 67% from 54 tests.

About plugin

  • Plugin page: mageewp-page-layout
  • Plugin version: 2.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 5.9.2
  • First release: Feb 16, 2017
  • Latest release: Mar 23, 2018
  • Number of updates: 59
  • Update frequency: every 6.8 days
  • Top authors: magictheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 36,366 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲2.59MB] [CPU: ▼313.77ms] Passed 4 tests

Analyzing server-side resources used by Mageewp Page Layout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.33 ▲2.8268.28 ▲13.54
Dashboard /wp-admin6.00 ▲2.5952.34 ▲19.01
Posts /wp-admin/edit.php6.22 ▲2.5854.95 ▲19.76
Add New Post /wp-admin/post-new.php9.51 ▲2.54113.62 ▼1,298.94
Media Library /wp-admin/upload.php5.95 ▲2.6538.48 ▲11.32
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php7.2457.83

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 528 new files
Database: no new tables, 4 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_mpl_widget_content
mpl_do_activation_redirect

Browser metrics Passed 4 tests

A check of browser resources used by Mageewp Page Layout
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,198 ▲47618.52 ▲2.8717.54 ▲11.332.73 ▲0.52
Dashboard /wp-admin3,118 ▲2647.95 ▲1.77142.62 ▲4.34176.22 ▲17.33
Posts /wp-admin/edit.php2,947 ▲2565.14 ▲1.9178.15 ▲12.38159.37 ▲14.53
Add New Post /wp-admin/post-new.php1,684 ▲2321.74 ▲5.14400.26 ▼20.85206.69 ▲46.06
Media Library /wp-admin/upload.php1,726 ▲285.60 ▲0.07107.65 ▼37.03213.57 ▲23.37
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php7,52520.53501.52165.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • mpl_do_activation_redirect
    • widget_recent-comments
    • widget_recent-posts
    • widget_mpl_widget_content

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

SRP 0% 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
The following issues need your attention
  • 11× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/mageewp-page-layout/includes/metabox/includes/admin-fields/field_link.php
    • > /wp-content/plugins/mageewp-page-layout/includes/metabox/includes/admin-fields/field_datetime.php
    • > /wp-content/plugins/mageewp-page-layout/includes/metabox/includes/admin-fields/field_color_picker.php
    • > /wp-content/plugins/mageewp-page-layout/includes/metabox/includes/admin-fields/field_image_picker.php
    • > /wp-content/plugins/mageewp-page-layout/includes/metabox/includes/admin-fields/field_icon_picker.php
    • > /wp-content/plugins/mageewp-page-layout/shortcodes/live_editor/mpl_row_inner.php
    • > /wp-content/plugins/mageewp-page-layout/includes/metabox/includes/admin-fields/field_default.php
    • > /wp-content/plugins/mageewp-page-layout/includes/metabox/includes/admin-fields/field_map.php
    • > /wp-content/plugins/mageewp-page-layout/includes/metabox/includes/admin-fields/field_image_select.php
    • > /wp-content/plugins/mageewp-page-layout/includes/metabox/includes/admin-fields/field_repeater.php
  • 75× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mageewp-page-layout/shortcodes/mpl_section_contact_4.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/mageewp-page-layout/shortcodes/mpl_section_slider.php:19
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/mageewp-page-layout/shortcodes/mpl_section_custom.php on line 7
    • > PHP Warning
      Use of undefined constant MPL_PATH - assumed 'MPL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mageewp-page-layout/includes/metabox/metabox.php on line 98
    • > PHP Warning
      include(MPL_PATH/includes/metabox/includes/admin-fields/field_map.php): failed to open stream: No such file or directory in wp-content/plugins/mageewp-page-layout/includes/metabox/metabox.php on line 86
    • > PHP Warning
      include(MPL_PATH/includes/metabox/includes/admin-fields/field_image_select.php): failed to open stream: No such file or directory in wp-content/plugins/mageewp-page-layout/includes/metabox/metabox.php on line 83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/mageewp-page-layout/shortcodes/mpl_section_counter.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mageewp-page-layout/gallery/featured-galleries.php:8
    • > PHP Warning
      include(): Failed opening 'MPL_PATH/includes/metabox/includes/admin-fields/field_repeater.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mageewp-page-layout/includes/metabox/metabox.php on line 87
    • > PHP Warning
      include(): Failed opening 'MPL_PATH/includes/metabox/includes/class-mpl-metaboxes.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mageewp-page-layout/includes/metabox/metabox.php on line 92

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Network (severe)
    wp-content/plugins/mageewp-page-layout/includes/frontend/vendors/prettyPhoto/css/prettyPhoto.min.css?ver=2.1.4 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Network (severe)
    wp-content/plugins/mageewp-page-layout/includes/frontend/vendors/owl-carousel/assets/owl.carousel.min.css?ver=2.1.4 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed: You can look at the official readme.txt

mageewp-page-layout/mageewp-page-layout.php Passed 13 tests

The principal PHP file in "Mageewp Page Layout" v. 2.1.4 is loaded by WordPress automatically on each request
129 characters long description:
Mageewp Page Layout, accompanied with different kinds of page layout styles, makes page building and editing a much easier thing.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin86,883 lines of code in 218 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript607,2764,07131,625
CSS481,69358728,109
PHP964,3682,23222,732
SVG93923,215
Sass49201,079
HTML1181123

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity62.91
▷ Minimum class complexity1.00
▷ Maximum class complexity296.00
Average method complexity6.34
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods255
▷ Static methods2710.59%
▷ Public methods20881.57%
▷ Protected methods93.53%
▷ Private methods3814.90%
Functions206
▷ Named functions206100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants1372.22%
▷ Class constants527.78%
▷ Public constants5100.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
223 PNG files occupy 0.25MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/header/sliding_menu_animation_move.png0.46KB0.26KB▼ 43.37%
assets/images/header/side_position_of_header_content_left.png0.28KB0.15KB▼ 46.37%
includes/frontend/vendors/prettyPhoto/images/prettyPhoto/facebook/contentPatternLeft.png0.13KB0.10KB▼ 24.82%
includes/frontend/vendors/vimeo_player/css/images/raster@2x.png2.66KB0.10KB▼ 96.07%
assets/images/header/submenu_hover_background_animation.png1.18KB0.64KB▼ 45.78%