77% wp-awesome-announcements

Code Review | WP Awesome Announcements

WordPress plugin WP Awesome Announcements scored 77% from 54 tests.

About plugin

  • Plugin page: wp-awesome-announ...
  • Plugin version: 2.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 24, 2013
  • Latest release: Aug 21, 2023
  • Number of updates: 15
  • Update frequency: every 245.3 days
  • Top authors: Litonice13 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 8,828 total downloads

Benchmarks

Plugin footprint 82% 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: ▲0.87MB] [CPU: ▲1,113.96ms] 50% from 4 tests

Analyzing server-side resources used by WP Awesome Announcements
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,308.92ms on /wp-admin/options-general.php?page=wp-awesome-announcements-recommended-plugins)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 1,113.96ms on /wp-admin/options-general.php?page=wp-awesome-announcements-recommended-plugins)
PageMemory (MB)CPU Time (ms)
Home /4.34 ▲0.88709.13 ▲668.06
Dashboard /wp-admin4.28 ▲0.981,671.80 ▲1,618.62
Posts /wp-admin/edit.php4.21 ▲0.861,250.06 ▲1,204.36
Add New Post /wp-admin/post-new.php6.74 ▲0.861,361.64 ▲1,263.81
Media Library /wp-admin/upload.php4.12 ▲0.891,354.08 ▲1,319.60
Add New /wp-admin/post-new.php?post_type=announcements4.231,296.12
Announcements /wp-admin/edit.php?post_type=announcements4.161,401.99
Recommended /wp-admin/options-general.php?page=wp-awesome-announcements-recommended-plugins4.021,308.92

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, 13 new options
New WordPress options
jltwann_notice_subscribe
jltwann_sheet_promo_data_hash
theysaidso_admin_options
widget_theysaidso_widget
jltwann_activation_time
jltwann_sheet_promo_data
wp_awesome_announcements_version
can_compress_scripts
db_upgraded
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by WP Awesome Announcements
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,080 ▲34513.66 ▼0.648.28 ▲6.4437.14 ▼11.47
Dashboard /wp-admin2,397 ▲2095.13 ▲0.27118.45 ▲13.5845.13 ▲2.48
Posts /wp-admin/edit.php2,206 ▲1202.07 ▲0.0640.64 ▲3.2029.69 ▼1.27
Add New Post /wp-admin/post-new.php1,640 ▲9820.93 ▲2.75598.02 ▼24.6653.65 ▲0.00
Media Library /wp-admin/upload.php1,502 ▲1144.32 ▼0.02113.05 ▼8.1047.81 ▼1.07
Add New /wp-admin/post-new.php?post_type=announcements2,3347.80176.1963.95
Announcements /wp-admin/edit.php?post_type=announcements1,1802.0346.2831.08
Recommended /wp-admin/options-general.php?page=wp-awesome-announcements-recommended-plugins1,2831.8731.1728.22

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 detected upon uninstall: 13 options
    • can_compress_scripts
    • wp_awesome_announcements_version
    • theysaidso_admin_options
    • jltwann_activation_time
    • widget_theysaidso_widget
    • db_upgraded
    • jltwann_notice_subscribe
    • widget_recent-comments
    • jltwann_notice_ask_for_rating
    • jltwann_sheet_promo_data
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'JLTWANN\\Libs\\RowLinks' not found in wp-content/plugins/wp-awesome-announcements/Inc/Classes/Row_Links.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-awesome-announcements/wp-awesome-announcements.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'JLTWANN\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/wp-awesome-announcements/Inc/Classes/Notifications/Ask_For_Rating.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTWANN\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/wp-awesome-announcements/Inc/Classes/Notifications/What_We_Collect.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JLTWANN\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/wp-awesome-announcements/Inc/Classes/Notifications/Subscribe.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JLTWANN\\Libs\\Upgrader' not found in wp-content/plugins/wp-awesome-announcements/Inc/Classes/Upgrade_Plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTWANN\\Libs\\Recommended' not found in wp-content/plugins/wp-awesome-announcements/Inc/Classes/Recommended_Plugins.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTWANN\\Inc\\Classes\otifications\\Model\\Popup' not found in wp-content/plugins/wp-awesome-announcements/Inc/Classes/Notifications/Upgrade_Notice.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=wp-awesome-announcements-recommended-plugins
    • > Network (severe)
    https://ps.w.org/ultimate-blocks-for-gutenberg/assets/icon-128x128.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% 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
5 plugin tags: news announcements, wordpress announcements, wordpress, scroll announcements, wordpress plugin

wp-awesome-announcements/wp-awesome-announcements.php 85% from 13 tests

"WP Awesome Announcements" version 2.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages/")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin4,414 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP377841,4633,099
CSS414370883
JavaScript56641432

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.29
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits2
Classes26
▷ Abstract classes415.38%
▷ Concrete classes2284.62%
▷ Final classes14.55%
Methods194
▷ Static methods3216.49%
▷ Public methods19198.45%
▷ Protected methods10.52%
▷ Private methods21.03%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants16
▷ Global constants1593.75%
▷ Class constants16.25%
▷ Public constants1100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 0.60MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.44KB0.00KB▼ 100.00%
(invalid) assets/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png0.15KB0.00KB▼ 100.00%
(invalid) assets/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.13KB0.00KB▼ 100.00%
(invalid) assets/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png0.15KB0.00KB▼ 100.00%
(invalid) assets/css/ui-lightness/images/ui-icons_222222_256x240.png7.65KB0.00KB▼ 100.00%