78% chrome-app-promote

Code Review | Chrome App Promoter Widget

WordPress plugin Chrome App Promoter Widget scored 78% from 54 tests.

About plugin

  • Plugin page: chrome-app-promote
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Sep 2, 2013
  • Latest release: Sep 6, 2013
  • Number of updates: 19
  • Update frequency: every 1.0 days
  • Top authors: mrfresh86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,065 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.92ms] Passed 4 tests

Analyzing server-side resources used by Chrome App Promoter Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.61 ▼9.38
Dashboard /wp-admin3.35 ▲0.0444.37 ▼2.79
Posts /wp-admin/edit.php3.40 ▲0.0445.13 ▼2.33
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.28 ▼1.19
Media Library /wp-admin/upload.php3.27 ▲0.0434.15 ▼0.23
Chrome App ID Settings /wp-admin/options-general.php?page=chromepromo-setting-admin3.2131.47

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_chrome_app_widget
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Chrome App Promoter Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲20213.57 ▼0.7312.64 ▲10.4739.56 ▼5.04
Dashboard /wp-admin2,210 ▲224.86 ▼0.06107.49 ▼3.0238.49 ▼7.30
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0937.87 ▼5.7132.21 ▼5.56
Add New Post /wp-admin/post-new.php1,522 ▼2023.26 ▲4.91645.72 ▲48.1357.28 ▲0.75
Media Library /wp-admin/upload.php1,386 ▼24.17 ▼0.1697.93 ▼10.5941.13 ▼7.75
Chrome App ID Settings /wp-admin/options-general.php?page=chromepromo-setting-admin7932.0625.7527.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_chrome_app_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=chromepromo-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=chromepromo-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/chrome-app-promote/promotechromeapp.php:18

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
You can look at the official readme.txt

chrome-app-promote/promotechromeapp.php 85% from 13 tests

This is the main PHP file of "Chrome App Promoter Widget" version 1.0.2, 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:
  • Description: Please keep the plugin description shorter than 140 characters (currently 610 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("chrome-app-promote.php" instead of "promotechromeapp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected274 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP18549141
JavaScript1111093
JSON10025
HTML15015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.06MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/close.png0.46KB0.35KB▼ 23.84%
img/defaulticon.png3.50KB0.99KB▼ 71.67%
img/button_gradient.png2.77KB0.21KB▼ 92.46%
img/button_click.png2.77KB0.20KB▼ 92.89%
img/close_hover.png3.04KB0.33KB▼ 89.19%