66% admin-notices-for-team

Code Review | Ant Admin Notices for Team

WordPress plugin Ant Admin Notices for Team scored 66% from 54 tests.

About plugin

  • Plugin page: admin-notices-for...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 5.9.2
  • First release: Jul 6, 2017
  • Latest release: Apr 11, 2018
  • Number of updates: 17
  • Update frequency: every 16.4 days
  • Top authors: dangub86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 774 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
Install script ran successfully

Server metrics [RAM: ▲1.73MB] [CPU: ▼303.06ms] Passed 4 tests

Analyzing server-side resources used by Ant Admin Notices for Team
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.53 ▲2.0169.11 ▲20.58
Dashboard /wp-admin5.40 ▲1.9936.09 ▲2.50
Posts /wp-admin/edit.php5.40 ▲1.7636.70 ▼1.06
Add New Post /wp-admin/post-new.php8.13 ▲1.1688.75 ▼1,215.70
Media Library /wp-admin/upload.php5.40 ▲2.1032.76 ▲2.03
Freemius Debug [v.1.2.2.9] /wp-admin/admin.php?page=freemius5.4032.70

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 382 new files
Database: no new tables, 4 new options
New WordPress options
fs_debug_mode
fs_api_cache
fs_accounts
fs_active_plugins

Browser metrics Passed 4 tests

Checking browser requirements for Ant Admin Notices for Team
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,869 ▲14716.32 ▲0.735.99 ▲0.172.86 ▲0.44
Dashboard /wp-admin2,993 ▲1357.00 ▲0.77135.66 ▲3.64175.33 ▲14.38
Posts /wp-admin/edit.php2,808 ▲1143.30 ▲0.0573.22 ▲7.16172.04 ▲26.07
Add New Post /wp-admin/post-new.php1,743 ▲8222.79 ▲7.16398.11 ▼44.55184.80 ▲31.79
Media Library /wp-admin/upload.php1,812 ▲1186.05 ▲0.50132.33 ▼43.36199.75 ▼40.11
Freemius Debug [v.1.2.2.9] /wp-admin/admin.php?page=freemius1,4963.1761.25130.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_api_cache
    • fs_active_plugins
    • fs_accounts
    • fs_debug_mode

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Notice in wp-content/plugins/admin-notices-for-team/admin/class-ant_admin_notices_team-admin.php+1633
    Trying to access array offset on value of type bool

SRP 0% 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
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/admin-notices-for-team/trunk/admin/css/ant_admin_notices_custom.php
    • > /wp-content/plugins/admin-notices-for-team/admin/css/ant_admin_notices_custom.php
    • > /wp-content/plugins/admin-notices-for-team/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/admin-notices-for-team/trunk/freemius/templates/ajax-loader.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/admin-notices-for-team/trunk/admin/partials/ant_admin_notices_team-admin-display.php:89
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/admin-notices-for-team/admin/partials/ant_admin_notices_team-admin-display.php:89

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Network (severe)
    wp-content/plugins/admin-notices-for-team/admin/color-picker.js?ver=1.0.4 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: backend, team, bloggers, utility, blog...

admin-notices-for-team/ant_admin_notices_team.php 77% from 13 tests

This is the main PHP file of "Ant Admin Notices for Team" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 171 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("admin-notices-for-team.php" instead of "ant_admin_notices_team.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected27,198 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
PHP994,57410,81219,397
PO File52,1402,1634,830
Sass20329762,091
CSS113314360
JavaScript55893238
Markdown2680214
JSON10040
YAML22028

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,264)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity47.25
▷ Minimum class complexity1.00
▷ Maximum class complexity1,264.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes88
▷ Abstract classes44.55%
▷ Concrete classes8495.45%
▷ Final classes00.00%
Methods1,608
▷ Static methods25415.80%
▷ Public methods1,22276.00%
▷ Protected methods281.74%
▷ Private methods35822.26%
Functions162
▷ Named functions162100.00%
▷ Anonymous functions00.00%
Constants206
▷ Global constants16881.55%
▷ Class constants3818.45%
▷ Public constants38100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
trunk/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
trunk/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%