10% wcs-web-maintenance

Code Review | WCS Web Maintenance

WordPress plugin WCS Web Maintenance scored10%from 54 tests.

About plugin

  • Plugin page: wcs-web-maintenance
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9
  • WordPress version: 6.3.1
  • First release: Sep 3, 2017
  • Latest release: Nov 28, 2017
  • Number of updates: 3
  • Update frequency: every 28.7 days
  • Top authors: zipbreake (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,840 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.74MB] [CPU: ▼65.36ms] Passed 4 tests

Analyzing server-side resources used by WCS Web Maintenance
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.215.45 ▼44.31
Dashboard /wp-admin2.28 ▼1.037.20 ▼52.28
Posts /wp-admin/edit.php2.28 ▼1.086.71 ▼57.64
Add New Post /wp-admin/post-new.php2.28 ▼3.628.06 ▼107.22
Media Library /wp-admin/upload.php2.28 ▼0.967.94 ▼30.01

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 17 new options
New WordPress options
widget_theysaidso_widget
wcsmw_color_text
wcsmw_color_link2
wcsmw_body_content
wcsmw_color_link
wcsmw_body_title
wcsmw_roles
wcsmw_color_bg
wcsmw_color_icon
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for WCS Web Maintenance
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10513.64 ▼0.841.69 ▲0.0141.33 ▼1.80
Dashboard /wp-admin2,275 ▲985.86 ▲0.3495.71 ▲2.2840.90 ▼3.46
Posts /wp-admin/edit.php2,145 ▲452.31 ▲0.3641.66 ▼1.0735.28 ▼2.73
Add New Post /wp-admin/post-new.php1,563 ▲3518.23 ▼4.88630.57 ▼76.9748.85 ▼13.27
Media Library /wp-admin/upload.php1,437 ▲374.48 ▲0.29101.18 ▼11.4144.03 ▼3.52
Maintenance mode /wp-admin/wcs-web-maintenance.php260.420.0814.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin did not uninstall successfully, leaving 17 options in the database
    • wcsmw_color_link
    • wcsmw_body_subtitle
    • wcsmw_color_link2
    • widget_recent-posts
    • wcsmw_head_title
    • widget_theysaidso_widget
    • wcsmw_body_content
    • theysaidso_admin_options
    • wcsmw_roles
    • wcsmw_color_text
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/wcs-web-maintenance.php
    • > Network (severe)
    wp-admin/wcs-web-maintenance.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

wcs-web-maintenance/wcs-web-maintenance.php 92% from 13 tests

"WCS Web Maintenance" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin520 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12468413
PO File14351100
JavaScript1007

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png63.76KB30.66KB▼ 51.92%
screenshot-2.png19.31KB9.73KB▼ 49.63%