84% welcome-mobile

Code Review | Welcome! Mobile

WordPress plugin Welcome! Mobile scored 84% from 54 tests.

About plugin

  • Plugin page: welcome-mobile
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6
  • WordPress version: 6.3.1
  • First release: Apr 15, 2015
  • Latest release: Jul 28, 2016
  • Number of updates: 26
  • Update frequency: every 18.1 days
  • Top authors: mladimatija (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,191 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼1.42ms] Passed 4 tests

Server-side resources used by Welcome! Mobile
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2649.21 ▲1.39
Dashboard /wp-admin3.63 ▲0.3355.77 ▲1.58
Posts /wp-admin/edit.php3.68 ▲0.3349.93 ▼2.36
Add New Post /wp-admin/post-new.php6.17 ▲0.2891.29 ▼6.19
Media Library /wp-admin/upload.php3.49 ▲0.2639.64 ▲1.50
Welcome! Mobile /wp-admin/options-general.php?page=welcome-mobile3.5444.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Welcome! Mobile
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲14814.25 ▲0.946.26 ▲4.3742.72 ▼6.87
Dashboard /wp-admin2,231 ▲255.11 ▲0.26115.22 ▲2.5841.97 ▼0.68
Posts /wp-admin/edit.php2,119 ▲302.29 ▲0.3237.62 ▼2.7433.75 ▼2.15
Add New Post /wp-admin/post-new.php1,536 ▲323.41 ▲0.42725.76 ▲66.0236.11 ▼22.65
Media Library /wp-admin/upload.php1,410 ▲284.55 ▲0.36100.80 ▼1.6744.62 ▲1.88
Welcome! Mobile /wp-admin/options-general.php?page=welcome-mobile2,23710.19197.1874.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/welcome-mobile/admin/partials/welcome-mobile-admin-display.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Mobile_Detect' not found in wp-content/plugins/welcome-mobile/public/partials/welcome-mobile-public-display.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Welcome! Mobile Settings page. Pretty simple and self-explanatory.)
Please take inspiration from this readme.txt

welcome-mobile/welcome-mobile.php Passed 13 tests

This is the main PHP file of "Welcome! Mobile" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
69 characters long description:
Display a welcome message to users browsing your site on smartphones.

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin1,298 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP132771,2051,040
JavaScript33612162
CSS26456
Markdown115028
SVG10012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity16.88
▷ Minimum class complexity1.00
▷ Maximum class complexity123.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods79
▷ Static methods1113.92%
▷ Public methods7291.14%
▷ Protected methods22.53%
▷ Private methods56.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png49.62KB16.35KB▼ 67.05%