10% mockpress

Code Review | MockPress - Landing Page Template Elementor

WordPress plugin MockPress - Landing Page Template Elementor scored10%from 54 tests.

About plugin

  • Plugin page: mockpress
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9.3
  • WordPress version: 6.3.1
  • First release: Sep 28, 2021
  • Latest release: May 16, 2022
  • Number of updates: 41
  • Update frequency: every 5.6 days
  • Top authors: mockpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,865 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/mockpress/mockpress.php+34
    Use of undefined constant ELEMENTOR_VERSION - assumed 'ELEMENTOR_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.74ms] Passed 4 tests

This is a short check of server-side resources used by MockPress - Landing Page Template Elementor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.23 ▼5.09
Dashboard /wp-admin3.31 ▼0.0455.03 ▼12.78
Posts /wp-admin/edit.php3.36 ▲0.0049.30 ▼6.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.95 ▼6.81
Media Library /wp-admin/upload.php3.23 ▲0.0039.25 ▲2.42

Server storage [IO: ▲0.98MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/mockpress/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 108 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for MockPress - Landing Page Template Elementor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.60 ▲0.082.10 ▲0.4144.04 ▲4.31
Dashboard /wp-admin2,224 ▲184.84 ▼0.09100.09 ▼2.0641.32 ▼5.74
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0535.30 ▼1.9435.37 ▼1.49
Add New Post /wp-admin/post-new.php1,531 ▼123.05 ▲0.01619.59 ▼20.4158.80 ▲7.37
Media Library /wp-admin/upload.php1,400 ▼34.21 ▼0.20100.21 ▼2.6942.72 ▼1.73

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mockpress/admin/manager/header.php
  • 39× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant MOCKPRESS_PATH - assumed 'MOCKPRESS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mockpress/includes/widgets/four_widget/four_widget.php on line 9
    • > PHP Warning
      Use of undefined constant QI_ADDONS_FOR_ELEMENTOR_SHORTCODES_PATH - assumed 'QI_ADDONS_FOR_ELEMENTOR_SHORTCODES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mockpress/includes/widgets/four_widget/includes/shortcode/process/variations/horizontal/include.php on line 3
    • > PHP Notice
      Undefined variable: item_classes in wp-content/plugins/mockpress/includes/widgets/four_widget/includes/shortcode/process/variations/vertical/layouts/vertical.php on line 2
    • > PHP Warning
      require_once(MOCKPRESS_PATH/includes/endpoints/get-licenses.php): failed to open stream: No such file or directory in wp-content/plugins/mockpress/includes/plugin.php on line 176
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mockpress/includes/widgets/four_widget/includes/shortcode/process/variations/horizontal/horizontal.php:17
    • > PHP Warning
      Use of undefined constant MOCKPRESS_URL - assumed 'MOCKPRESS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mockpress/admin/manager/header.php on line 6
    • > PHP Warning
      Use of undefined constant MOCKPRESS_URL - assumed 'MOCKPRESS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mockpress/includes/widgets/four_widget/four_widget.php on line 10
    • > PHP Warning
      Use of undefined constant MOCKPRESS_URL - assumed 'MOCKPRESS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mockpress/admin/manager/header.php on line 13
    • > PHP Warning
      include_once(): Failed opening 'QI_ADDONS_FOR_ELEMENTOR_SHORTCODES_PATH/process/variations/horizontal/horizontal.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mockpress/includes/widgets/four_widget/includes/shortcode/process/variations/horizontal/include.php on line 3
    • > PHP Warning
      Use of undefined constant MOCKPRESS_PATH - assumed 'MOCKPRESS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mockpress/includes/plugin.php on line 176

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: elementor, template, design

mockpress/mockpress.php Passed 13 tests

The main file in "MockPress - Landing Page Template Elementor" v. 1.0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
28 characters long description:
Template Elementor Indonesia

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin8,465 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
PHP529761,3725,751
CSS13163221,569
JavaScript540105924
SVG1501191
Markdown29030

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.47
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods124
▷ Static methods129.68%
▷ Public methods8770.16%
▷ Protected methods2721.77%
▷ Private methods108.06%
Functions31
▷ Named functions2374.19%
▷ Anonymous functions825.81%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.40MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/widgets/four_widget/includes/shortcode/process/assets/img/dashboard_icon.png1.33KB0.33KB▼ 75.48%
admin/assets/img/User1.png15.87KB5.97KB▼ 62.39%
admin/assets/img/Feedback.png16.31KB5.94KB▼ 63.61%
admin/assets/img/Rectangle 599.png125.62KB44.52KB▼ 64.56%
admin/assets/img/bg.png14.06KB11.43KB▼ 18.71%