78% jetpack-mobile-theme-floating-ad

Code Review | Jetpack Mobile Theme Floating Ad

WordPress plugin Jetpack Mobile Theme Floating Ad scored78%from 54 tests.

About plugin

  • Plugin page: jetpack-mobile-th...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2015
  • Latest release: Jul 17, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: helpgeek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,252 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.04MB] [CPU: ▼10.21ms] Passed 4 tests

An overview of server-side resources used by Jetpack Mobile Theme Floating Ad
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.18 ▼4.99
Dashboard /wp-admin3.35 ▲0.0544.18 ▼5.49
Posts /wp-admin/edit.php3.40 ▲0.0449.05 ▲1.45
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.17 ▼29.94
Media Library /wp-admin/upload.php3.27 ▲0.0434.96 ▼0.42
Jetpack Mobile Floating Ad /wp-admin/options-general.php?page=jp_floating_ad3.2129.65

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Jetpack Mobile Theme Floating Ad
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.81 ▲0.581.67 ▼0.0742.02 ▲2.04
Dashboard /wp-admin2,210 ▲195.90 ▲1.04107.16 ▼1.1640.59 ▼3.67
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0340.08 ▼2.7637.75 ▲3.05
Add New Post /wp-admin/post-new.php1,522 ▼1723.27 ▲0.05677.48 ▲31.7658.04 ▼0.62
Media Library /wp-admin/upload.php1,392 ▲44.22 ▲0.0697.57 ▼2.9243.58 ▼0.79
Jetpack Mobile Floating Ad /wp-admin/options-general.php?page=jp_floating_ad9282.0825.0428.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=jp_floating_ad
    • > Notice in wp-content/plugins/jetpack-mobile-theme-floating-ad/jetpack-mobile-theme-floating-ad.php+212
    Undefined index: google_ad_client
    • > GET request to /wp-admin/options-general.php?page=jp_floating_ad
    • > Notice in wp-content/plugins/jetpack-mobile-theme-floating-ad/jetpack-mobile-theme-floating-ad.php+215
    Undefined index: google_ad_slot

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/jetpack-mobile-theme-floating-ad/jetpack-mobile-theme-floating-ad.php

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 96% from 29 tests

readme.txt Passed 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
6 plugin tags: advertising, responsive, adsense, ads, jetpack...

jetpack-mobile-theme-floating-ad/jetpack-mobile-theme-floating-ad.php 92% from 13 tests

This is the main PHP file of "Jetpack Mobile Theme Floating Ad" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin183 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15057183

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin