84% wp-smile-query

Code Review | Smile Query

WordPress plugin Smile Query scored84%from 54 tests.

About plugin

  • Plugin page: wp-smile-query
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.4
  • WordPress version: 6.3.1
  • First release: Dec 28, 2018
  • Latest release: Mar 9, 2020
  • Number of updates: 9
  • Update frequency: every 48.6 days
  • Top authors: knowledgeflow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /638 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: ▼6.04ms] Passed 4 tests

Analyzing server-side resources used by Smile Query
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.88 ▲4.46
Dashboard /wp-admin3.31 ▲0.0147.03 ▲1.36
Posts /wp-admin/edit.php3.36 ▲0.0141.43 ▼8.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.24 ▼16.81
Media Library /wp-admin/upload.php3.23 ▲0.0134.29 ▼0.23

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Smile Query: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.53 ▼0.041.68 ▼0.0043.94 ▲2.15
Dashboard /wp-admin2,218 ▲325.80 ▲0.83102.22 ▼11.2542.82 ▼1.62
Posts /wp-admin/edit.php2,104 ▲121.99 ▼0.0637.29 ▼4.1138.75 ▲1.70
Add New Post /wp-admin/post-new.php1,552 ▲2418.47 ▼4.75646.22 ▲44.7063.98 ▲5.67
Media Library /wp-admin/upload.php1,397 ▲94.18 ▼0.00103.22 ▲2.1951.45 ▲8.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smile-query/smilequery.php:38

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: communication, form

wp-smile-query/smilequery.php 92% from 13 tests

The main PHP script in "Smile Query" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-smile-query.php" instead of "smilequery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin171 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1212994
CSS119077

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
img/wp-logo.png4.53KB2.32KB▼ 48.87%