78% wp-saint

Code Review | WP Saint

WordPress plugin WP Saint scored78%from 54 tests.

About plugin

  • Plugin page: wp-saint
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2018
  • Latest release: Mar 3, 2020
  • Number of updates: 18
  • Update frequency: every 30.5 days
  • Top authors: ashish963 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /594 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by WP Saint
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.72 ▼1.68
Dashboard /wp-admin3.36 ▲0.0645.16 ▼3.96
Posts /wp-admin/edit.php3.41 ▲0.0647.41 ▼4.25
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.17 ▼21.18
Media Library /wp-admin/upload.php3.29 ▲0.0636.51 ▲1.71
Third Party Scripts /wp-admin/admin.php?page=wp_saint_third_party_scripts3.2733.38
Web Analytics /wp-admin/admin.php?page=wp_saint_web_analytics3.2542.94

Server storage [IO: ▲0.26MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Saint
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14213.41 ▼0.858.99 ▲7.1143.94 ▼1.44
Dashboard /wp-admin2,229 ▲495.58 ▲0.0584.58 ▼4.4436.49 ▼0.86
Posts /wp-admin/edit.php2,128 ▲282.03 ▲0.0338.19 ▼2.9533.94 ▼5.43
Add New Post /wp-admin/post-new.php1,553 ▲2723.11 ▲0.18614.09 ▼53.3662.57 ▲7.94
Media Library /wp-admin/upload.php1,434 ▲404.19 ▼0.02102.33 ▼3.0344.39 ▲3.62
Third Party Scripts /wp-admin/admin.php?page=wp_saint_third_party_scripts1,1022.4739.5440.73
Web Analytics /wp-admin/admin.php?page=wp_saint_web_analytics1,1812.1346.4336.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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 0% 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
Please take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-saint/admin/partials/wp-saint-admin-display.php
    • > /wp-content/plugins/wp-saint/public/partials/wp-saint-public-display.php
    • > /wp-content/plugins/wp-saint/admin/partials/footer.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-saint/admin/partials/side-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-saint/admin/partials/header.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-saint === )
  • Screenshots: Add a description for screenshot #4 in wp-saint/assets to your readme.txt
The official readme.txt might help

wp-saint/wp-saint.php Passed 13 tests

The entry point to "WP Saint" version 1.0.0 is a PHP file that has certain tags in its header comment area
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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
Success! There were no dangerous files found in this plugin1,930 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP186511,1151,430
JavaScript564133274
CSS64921226

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods106
▷ Static methods1211.32%
▷ Public methods7368.87%
▷ Protected methods00.00%
▷ Private methods3331.13%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants41
▷ Global constants12.44%
▷ Class constants4097.56%
▷ Public constants40100.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
7 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
admin/css/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
admin/css/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
admin/images/300px-X-250px-AD.png21.71KB20.84KB▼ 3.99%
admin/css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%