84% womens-refuge-shielded-site

Code Review | Women's Refuge Shielded Site

WordPress plugin Women's Refuge Shielded Site scored 84% from 54 tests.

About plugin

  • Plugin page: womens-refuge-shi...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2021
  • Latest release: Mar 2, 2023
  • Number of updates: 7
  • Update frequency: every 98.0 days
  • Top authors: fychan66 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 350 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▲0.75ms] Passed 4 tests

Server-side resources used by Women's Refuge Shielded Site
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.34 ▲0.94
Dashboard /wp-admin3.35 ▲0.0546.97 ▼2.93
Posts /wp-admin/edit.php3.40 ▲0.0553.03 ▲4.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0598.84 ▲7.30
Media Library /wp-admin/upload.php3.28 ▲0.0533.13 ▲1.00

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Women's Refuge Shielded Site
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7413.29 ▼1.305.16 ▲3.1142.93 ▲2.16
Dashboard /wp-admin2,211 ▲224.83 ▼0.1099.69 ▼11.4735.97 ▼4.58
Posts /wp-admin/edit.php2,091 ▲52.00 ▲0.0238.12 ▲0.3331.42 ▼0.40
Add New Post /wp-admin/post-new.php1,530 ▼822.99 ▼0.41633.55 ▲38.9465.32 ▼1.92
Media Library /wp-admin/upload.php1,393 ▲84.24 ▲0.0295.59 ▼19.9242.04 ▼0.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_wrss_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/womens-refuge-shielded-site/includes/class-wrss_widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/womens-refuge-shielded-site/includes/class-wrss-widget.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: womens refuge, shielded site, aotearoa, new zealand, charity

womens-refuge-shielded-site/womens_refuge_shielded_site.php 85% from 13 tests

"Women's Refuge Shielded Site" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("womens-refuge-shielded-site.php" instead of "womens_refuge_shielded_site.php")

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
Everything looks great! No dangerous files found in this plugin585 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP581266283
PO File44444160
JavaScript20088
Markdown229053
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/large-logo.png8.47KB3.51KB▼ 58.55%
img/small-logo.png4.83KB2.48KB▼ 48.72%
img/button-logo.png5.30KB2.58KB▼ 51.38%
img/big-logo.png5.84KB5.85KB0.00%