83% hello-salvador

Code Review | Hello Salvador

WordPress plugin Hello Salvador scored83%from 54 tests.

About plugin

  • Plugin page: hello-salvador
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2015
  • Latest release: Jul 14, 2015
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: sergiuscosta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /561 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.01MB] [CPU: ▲2.83ms] Passed 4 tests

A check of server-side resources used by Hello Salvador
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.40 ▲2.61
Dashboard /wp-admin3.31 ▲0.0159.28 ▼1.89
Posts /wp-admin/edit.php3.36 ▲0.0154.91 ▲6.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.79 ▲4.43
Media Library /wp-admin/upload.php3.23 ▲0.0141.28 ▲7.97

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hello Salvador
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2213.24 ▼1.351.68 ▼0.4940.35 ▼5.26
Dashboard /wp-admin2,206 ▲305.85 ▼0.01111.10 ▼3.9544.61 ▼7.58
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0445.75 ▲2.8237.40 ▼3.58
Add New Post /wp-admin/post-new.php1,670 ▲15022.07 ▼0.96696.23 ▼12.2956.71 ▼2.47
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.05110.35 ▼14.6457.23 ▲13.64

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hello-salvador/index.php:52

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

hello-salvador/index.php 85% from 13 tests

The principal PHP file in "Hello Salvador" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("hello-salvador.php" instead of "index.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin42 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP151037
Markdown1305

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
wtfpl-badge.png2.91KB1.80KB▼ 37.92%