10% aopush

Code Review | АвтоОфис.Пуш push-уведомления на вашем сайте

WordPress plugin АвтоОфис.Пуш push-уведомления на вашем сайте scored 10% from 54 tests.

About plugin

  • Plugin page: aopush
  • Plugin version: 1.1.02
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.9-7.3.10
  • WordPress version: 6.3.1
  • First release: Apr 8, 2019
  • Latest release: Mar 16, 2022
  • Number of updates: 17
  • Update frequency: every 63.2 days
  • Top authors: autooffice (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 835 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'AopushAdmin' does not have a method 'aopush_install'

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.83ms] Passed 4 tests

Server-side resources used by АвтоОфис.Пуш push-уведомления на вашем сайте
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.36 ▼8.29
Dashboard /wp-admin3.33 ▲0.0347.45 ▼0.92
Posts /wp-admin/edit.php3.38 ▲0.0349.59 ▲1.91
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.83 ▼0.00
Media Library /wp-admin/upload.php3.25 ▲0.0338.12 ▲2.67

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for АвтоОфис.Пуш push-уведомления на вашем сайте
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.59 ▼0.781.57 ▼0.7040.83 ▼10.62
Dashboard /wp-admin2,224 ▲365.82 ▼0.04113.62 ▲6.7993.72 ▲51.89
Posts /wp-admin/edit.php2,107 ▲151.98 ▼0.0338.21 ▼0.6133.72 ▲1.09
Add New Post /wp-admin/post-new.php1,536 ▲2218.33 ▲0.78695.85 ▲30.8365.61 ▲9.59
Media Library /wp-admin/upload.php1,403 ▲184.16 ▼0.04100.52 ▼1.3065.90 ▲22.70

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aopush/views/page/__test.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aopush/views/page/__mailing.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/aopush/views/admin_page_push.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/aopush/views/page/__help.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/aopush/views/page/__templates.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aopush/views/page/__settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aopush/views/page/__events.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/aopush/aopush_plugin.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/aopush/views/page/__history.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: aopush

aopush/aopush_plugin.php 85% from 13 tests

The entry point to "АвтоОфис.Пуш push-уведомления на вашем сайте" version 1.1.02 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 585 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("aopush.php" instead of "aopush_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin7,060 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,959
PHP144481791,969
CSS550911,845
PO File1100101219
JavaScript6112968

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity47.33
▷ Minimum class complexity30.00
▷ Maximum class complexity59.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods51
▷ Static methods611.76%
▷ Public methods4690.20%
▷ Protected methods00.00%
▷ Private methods59.80%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/ui/ui-icons_2e83ff_256x240.png3.67KB4.17KB0.00%
assets/img/icon.png0.37KB0.42KB0.00%
assets/img/ui/ui-bg_flat_75_ffffff_40x100.png0.07KB0.08KB0.00%
assets/img/ui/ui-bg_glass_75_e6e6e6_1x400.png0.12KB0.15KB0.00%
assets/img/logo.png1.43KB1.44KB0.00%