84% mpress

Code Review | MPress

WordPress plugin MPress scored84%from 54 tests.

About plugin

  • Plugin page: mpress
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 24, 2018
  • Latest release: Jun 27, 2018
  • Number of updates: 14
  • Update frequency: every 0.2 days
  • Top authors: dkarfa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /910 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼1.63ms] Passed 4 tests

An overview of server-side resources used by MPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4343.31 ▲4.66
Dashboard /wp-admin3.76 ▲0.4649.00 ▼5.72
Posts /wp-admin/edit.php3.81 ▲0.4654.00 ▲3.65
Add New Post /wp-admin/post-new.php6.32 ▲0.4391.45 ▼9.12
Media Library /wp-admin/upload.php3.62 ▲0.3942.88 ▲6.83
MPress /wp-admin/admin.php?page=mpress3.6039.23
Help /wp-admin/admin.php?page=mpress-help3.5935.79

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 407 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by MPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲5514.73 ▲0.441.75 ▲0.0243.24 ▲1.09
Dashboard /wp-admin2,232 ▲545.56 ▼0.1490.18 ▼14.7877.41 ▲34.38
Posts /wp-admin/edit.php2,152 ▲551.97 ▲0.0241.41 ▲2.8035.72 ▼4.50
Add New Post /wp-admin/post-new.php1,589 ▲6023.15 ▼0.51755.59 ▲109.8758.55 ▼5.17
Media Library /wp-admin/upload.php1,449 ▲554.25 ▲0.10117.41 ▲18.2981.24 ▲36.10
MPress /wp-admin/admin.php?page=mpress9382.0027.4531.50
Help /wp-admin/admin.php?page=mpress-help8321.9923.7130.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 220× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Mailgun\\Model\\ApiResponse' not found in wp-content/plugins/mpress/vendor/mailgun/mailgun-php/src/Mailgun/Model/Suppression/Unsubscribe/IndexResponse.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Message\\Builder\\ResponseBuilder' not found in wp-content/plugins/mpress/vendor/php-http/curl-client/src/ResponseBuilder.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Discovery\\Exception\\StrategyUnavailableException' not found in wp-content/plugins/mpress/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Discovery\\Strategy\\DiscoveryStrategy' not found in wp-content/plugins/mpress/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Mailgun\\Model\\ApiResponse' not found in wp-content/plugins/mpress/vendor/mailgun/mailgun-php/src/Mailgun/Model/Domain/DeleteCredentialResponse.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\MessageFactory' not found in wp-content/plugins/mpress/vendor/php-http/message/src/MessageFactory/GuzzleMessageFactory.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Mailgun\\Exception' not found in wp-content/plugins/mpress/vendor/mailgun/mailgun-php/src/Mailgun/Messages/Exceptions/MissingRequiredMIMEParameters.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Mailgun\\Exception' not found in wp-content/plugins/mpress/vendor/mailgun/mailgun-php/src/Mailgun/Exception/InvalidArgumentException.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\StreamFactory' not found in wp-content/plugins/mpress/vendor/php-http/message/src/StreamFactory/GuzzleStreamFactory.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\RequestMatcher' not found in wp-content/plugins/mpress/vendor/php-http/message/src/RequestMatcher/RegexRequestMatcher.php:17

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 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: wordpress to mobile, mpress, mobile apps

mpress/mpress.php Passed 13 tests

The main PHP file in "MPress" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
61 characters long description:
MPress, convert your WordPress website to Mobile Application.

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
Everything looks great! No dangerous files found in this plugin20,733 lines of code in 381 files:
LanguageFilesBlank linesComment linesLines of code
PHP3174,50811,68116,262
Markdown341,40802,561
JSON21001,777
YAML415263
XML24046
CSS11411
SVG121010
JavaScript12273

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.64
▷ Minimum class complexity1.00
▷ Maximum class complexity174.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces61
Interfaces31
Traits12
Classes256
▷ Abstract classes72.73%
▷ Concrete classes24997.27%
▷ Final classes12048.19%
Methods1,587
▷ Static methods19212.10%
▷ Public methods1,35085.07%
▷ Protected methods593.72%
▷ Private methods17811.22%
Functions176
▷ Named functions3117.61%
▷ Anonymous functions14582.39%
Constants38
▷ Global constants513.16%
▷ Class constants3386.84%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected