77% wps-notice-center

Code Review | WPS Notice Center

WordPress plugin WPS Notice Center scored 77% from 54 tests.

About plugin

  • Plugin page: wps-notice-center
  • Plugin version: 1.2.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 30
  • Update frequency: every 52.9 days
  • Top authors: NicolasKulka (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

6,000+ active / 39,992 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.66ms] Passed 4 tests

An overview of server-side resources used by WPS Notice Center
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.13 ▼1.65
Dashboard /wp-admin3.32 ▲0.0245.01 ▼10.31
Posts /wp-admin/edit.php3.37 ▲0.0150.88 ▲2.72
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.96 ▼0.65
Media Library /wp-admin/upload.php3.25 ▲0.0232.41 ▼2.02

Server storage [IO: ▲0.05MB] [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
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WPS Notice Center
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.23 ▼1.151.68 ▼0.6443.01 ▼2.41
Dashboard /wp-admin2,254 ▲694.90 ▼0.91108.12 ▲4.0341.94 ▼3.72
Posts /wp-admin/edit.php2,143 ▲542.22 ▲0.1738.54 ▲3.4237.88 ▲4.17
Add New Post /wp-admin/post-new.php1,559 ▲2117.62 ▼5.81666.90 ▲5.7854.09 ▼2.40
Media Library /wp-admin/upload.php1,429 ▲384.23 ▼0.0799.95 ▼3.4144.20 ▼0.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wps-notice-center/wps-notice-center.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Trait 'WPS\\WPS_Notice_Center\\Singleton' not found in wp-content/plugins/wps-notice-center/classes/plugin.php on line 5
    • > PHP Warning
      Use of undefined constant WPS_NOTICE_CENTER_DIR - assumed 'WPS_NOTICE_CENTER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wps-notice-center/autoload.php on line 203
    • > PHP Warning
      Use of undefined constant WPS_NOTICE_CENTER_DIR - assumed 'WPS_NOTICE_CENTER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wps-notice-center/autoload.php on line 197

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)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

wps-notice-center/wps-notice-center.php 77% from 13 tests

The principal PHP file in "WPS Notice Center" v. 1.2.6 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 196 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin920 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14250334711
CSS1011127
PO File1141557
JSON20025

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity11.29
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods48
▷ Static methods1531.25%
▷ Public methods4287.50%
▷ Protected methods48.33%
▷ Private methods24.17%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin