90% site-announcements

Code Review | Site Announcements

WordPress plugin Site Announcements scored90%from 54 tests.

About plugin

  • Plugin page: site-announcements
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2017
  • Latest release: Feb 28, 2019
  • Number of updates: 7
  • Update frequency: every 83.3 days
  • Top authors: wpnook (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /5,766 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.30ms] Passed 4 tests

Server-side resources used by Site Announcements
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1239.16 ▼10.13
Dashboard /wp-admin3.42 ▲0.1245.22 ▼2.99
Posts /wp-admin/edit.php3.50 ▲0.1548.56 ▲1.53
Add New Post /wp-admin/post-new.php6.02 ▲0.1493.87 ▼1.44
Media Library /wp-admin/upload.php3.34 ▲0.1234.81 ▲1.35
All Announcements /wp-admin/edit.php?post_type=cw-announcement3.3836.71
Add New /wp-admin/post-new.php?post_type=cw-announcement3.5548.92

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Site Announcements
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10913.82 ▼0.551.80 ▼0.1139.94 ▼2.86
Dashboard /wp-admin2,255 ▲645.10 ▲0.17106.17 ▼0.2441.51 ▼3.57
Posts /wp-admin/edit.php2,140 ▲512.35 ▲0.3135.85 ▼3.5332.96 ▼3.40
Add New Post /wp-admin/post-new.php1,559 ▲2623.46 ▲0.18595.64 ▼79.3732.03 ▼28.73
Media Library /wp-admin/upload.php1,437 ▲494.57 ▲0.3895.93 ▼1.4739.74 ▼3.36
All Announcements /wp-admin/edit.php?post_type=cw-announcement1,1432.2737.8028.72
Add New /wp-admin/post-new.php?post_type=cw-announcement2,7728.27202.2868.81

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: news, users, messages, announcements

site-announcements/site-announcements.php 92% from 13 tests

The primary PHP file in "Site Announcements" version 1.0.4 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,971 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS2329141,358
PHP11157473376
JavaScript35018225
Markdown110012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin