83% wxy-searchmark

Code Review | WXY Searchmark

WordPress plugin WXY Searchmark scored83%from 54 tests.

About plugin

  • Plugin page: wxy-searchmark
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 4, 2018
  • Latest release: Nov 29, 2020
  • Number of updates: 49
  • Update frequency: every 15.7 days
  • Top authors: exoboy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,984 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
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▲3.28ms] Passed 4 tests

Server-side resources used by WXY Searchmark
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2849.00 ▲10.58
Dashboard /wp-admin3.56 ▲0.2652.26 ▲2.66
Posts /wp-admin/edit.php3.64 ▲0.2848.83 ▲2.22
Add New Post /wp-admin/post-new.php6.17 ▲0.2888.41 ▼1.18
Media Library /wp-admin/upload.php3.49 ▲0.2643.65 ▲9.40
WXY Searchmark /wp-admin/options-general.php?page=wxy_searchmark_options_page3.5539.37

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 23 new files
Database: 1 new table, 10 new options
New tables
wp_wxy_searchmark_data
New WordPress options
wxy_searchmark_registration_code
db_upgraded
can_compress_scripts
widget_theysaidso_widget
wxy_searchmark_registration_count
widget_recent-comments
wxy_searchmark_jal_db_version
wxy_searchmark_registration_date
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WXY Searchmark
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /8,877 ▲6,13117.87 ▲3.4997.39 ▲95.6848.23 ▲6.34
Dashboard /wp-admin5,138 ▲2,9475.91 ▲1.03204.18 ▲102.3851.20 ▲6.10
Posts /wp-admin/edit.php5,018 ▲2,9293.33 ▲1.27140.14 ▲103.7045.59 ▲7.17
Add New Post /wp-admin/post-new.php3,022 ▲1,50824.42 ▲7.00790.77 ▲114.6972.15 ▲12.44
Media Library /wp-admin/upload.php4,342 ▲2,9544.86 ▲0.67199.62 ▲101.7955.46 ▲7.91
WXY Searchmark /wp-admin/options-general.php?page=wxy_searchmark_options_page4,5452.95136.1153.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/wxy-searchmark/options/wxy-tools-searchmark-options.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wxy-searchmark/wxy-tools-searchmark-plugin.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wxy-searchmark === )
The official readme.txt is a good inspiration

wxy-searchmark/wxy-tools-searchmark-plugin.php 85% from 13 tests

The principal PHP file in "WXY Searchmark" v. 1.0.9 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wxy-searchmark.php" instead of "wxy-tools-searchmark-plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 194 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected7,316 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12,3642,1084,525
PHP29327481,960
CSS110943503
HTML122555328

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions28
▷ Named functions2796.43%
▷ Anonymous functions13.57%
Constants5
▷ Global constants5100.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.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
options/images/wxy-tools-searchmark-options-logo.png12.95KB5.66KB▼ 56.31%
images/wxy-tools-searchmark-options-logo.png12.95KB5.66KB▼ 56.31%