56% official-add-to-homescreen

Code Review | Official Add to Homescreen

WordPress plugin Official Add to Homescreen scored56%from 54 tests.

About plugin

  • Plugin page: official-add-to-h...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: May 7, 2014
  • Latest release: Sep 27, 2014
  • Number of updates: 11
  • Update frequency: every 13.0 days
  • Top authors: wordcubiq (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

700+ active /18,495 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.26MB] [CPU: ▼19.73ms] Passed 4 tests

This is a short check of server-side resources used by Official Add to Homescreen
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.424.62 ▼35.67
Dashboard /wp-admin3.48 ▲0.1052.54 ▼10.71
Posts /wp-admin/edit.php3.60 ▲0.2052.55 ▼3.85
Add New Post /wp-admin/post-new.php6.06 ▲0.1484.50 ▼28.69
Media Library /wp-admin/upload.php3.41 ▲0.1438.84 ▲0.98
Add To Homescreen /wp-admin/options-general.php?page=cubiq-add-to-home3.4536.96

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: 1 new table, 6 new options
New tables
wp_cubiq_add_to_home
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Official Add to Homescreen
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.041.99 ▲0.2645.79 ▲3.02
Dashboard /wp-admin2,196 ▲165.61 ▼0.0697.07 ▲8.9343.02 ▲2.86
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.1434.68 ▼5.0236.68 ▼2.10
Add New Post /wp-admin/post-new.php1,529 ▲323.27 ▼0.28660.84 ▼20.9656.11 ▲2.89
Media Library /wp-admin/upload.php1,407 ▲74.22 ▼0.04110.40 ▲8.9349.48 ▲0.75
Add To Homescreen /wp-admin/options-general.php?page=cubiq-add-to-home1,5063.2155.0730.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/official-add-to-homescreen/uninstall.php+24
    rmdir(wp-content/uploads/cubiq-add-to-home/): Directory not empty
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cubiq-add-to-home
    • > Notice in wp-content/plugins/official-add-to-homescreen/templates/admin.php+120
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cubiq-add-to-home
    • > Notice in wp-content/plugins/official-add-to-homescreen/includes/admin.php+369
    Undefined index: default

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/official-add-to-homescreen/templates/public.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/official-add-to-homescreen/templates/admin.php:2
    • > PHP Notice
      Undefined variable: isCompatible in wp-content/plugins/official-add-to-homescreen/templates/public.php on line 1

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=cubiq-add-to-home
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught Error: Invalid dimensions for plot, width = 0, height = 300

Optimizations

Plugin configuration 86% 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: mobile, homescreen, home screen, iphone, android...

official-add-to-homescreen/cubiq-add-to-home.php 69% from 13 tests

"Official Add to Homescreen" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 321 characters long)
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("official-add-to-homescreen.php" instead of "cubiq-add-to-home.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,169 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP617670793
CSS1362216
JavaScript53618160

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity26.67
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods626.09%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin