83% page-oscope-preview-by-mobilemoxie

Code Review | Page-oscope Preview by MobileMoxie

WordPress plugin Page-oscope Preview by MobileMoxie scored83%from 54 tests.

About plugin

  • Plugin page: page-oscope-previ...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 16, 2022
  • Latest release: Oct 9, 2022
  • Number of updates: 23
  • Update frequency: every 1.1 days
  • Top authors: mobilemoxiedev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,198 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Page-oscope Preview by MobileMoxie
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.14 ▼7.36
Dashboard /wp-admin3.33 ▼0.0256.22 ▼9.81
Posts /wp-admin/edit.php3.38 ▲0.0247.42 ▼6.70
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.16 ▼21.82
Media Library /wp-admin/upload.php3.25 ▲0.0237.35 ▲0.95

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

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • You have illegally modified 1 file (0.00KB) outside of "wp-content/plugins/page-oscope-preview-by-mobilemoxie/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/page-oscope-preview-by-mobilemoxie/assets/icon-128\303\227128.png"
Filesystem: 25 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

Checking browser requirements for Page-oscope Preview by MobileMoxie
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.35 ▲0.071.73 ▲0.0942.58 ▼1.30
Dashboard /wp-admin2,214 ▲345.58 ▼0.0184.31 ▼9.4876.87 ▲32.56
Posts /wp-admin/edit.php2,125 ▲222.00 ▼0.0133.09 ▼4.4531.67 ▼4.69
Add New Post /wp-admin/post-new.php1,550 ▲923.76 ▲1.04732.58 ▲60.2853.35 ▼18.46
Media Library /wp-admin/upload.php1,419 ▲194.13 ▼0.10100.04 ▼9.3678.91 ▲29.45

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/page-oscope-preview-by-mobilemoxie/admin/partials/mobilemoxie-page-oscope-preview-admin-publish-meta-box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/page-oscope-preview-by-mobilemoxie/admin/partials/mobilemoxie-page-oscope-preview-admin-form-signup.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2 in page-oscope-preview-by-mobilemoxie/assets to your readme.txt
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === page-oscope-preview-by-mobilemoxie === )
Please take inspiration from this readme.txt

page-oscope-preview-by-mobilemoxie/mobilemoxie-page-oscope-preview.php 77% from 13 tests

"Page-oscope Preview by MobileMoxie" version 0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("page-oscope-preview-by-mobilemoxie.php" instead of "mobilemoxie-page-oscope-preview.php")

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 plugin460 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12149573360
CSS10063
JavaScript15137

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.57
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods1335.14%
▷ Public methods2464.86%
▷ Protected methods00.00%
▷ Private methods1335.14%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/mobilemoxie-icon.png2.54KB1.38KB▼ 45.76%
admin/img/mobilemoxie-page-oscope-icon.png5.48KB3.52KB▼ 35.74%
assets/icon-128×128.png5.48KB3.52KB▼ 35.74%