84% apoyl-so

Code Review | 百度站内搜索和360站内搜索

WordPress plugin 百度站内搜索和360站内搜索 scored84%from 54 tests.

About plugin

  • Plugin page: apoyl-so
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Sep 8, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 9
  • Update frequency: every 49.0 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /545 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.17ms] Passed 4 tests

This is a short check of server-side resources used by 百度站内搜索和360站内搜索
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.35 ▼2.57
Dashboard /wp-admin3.35 ▲0.0051.70 ▼14.82
Posts /wp-admin/edit.php3.46 ▲0.1048.35 ▼0.59
Add New Post /wp-admin/post-new.php5.93 ▲0.0499.40 ▲2.52
Media Library /wp-admin/upload.php3.27 ▲0.0435.32 ▲1.32
settings /wp-admin/options-general.php?page=apoyl-so-settings3.2431.58

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
apoyl-so-settings
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

百度站内搜索和360站内搜索: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.22 ▼0.491.87 ▲0.2142.80 ▼0.88
Dashboard /wp-admin2,202 ▲225.59 ▼0.0786.01 ▼7.5140.39 ▼7.15
Posts /wp-admin/edit.php2,104 ▲42.15 ▲0.1437.55 ▼0.8737.39 ▼0.45
Add New Post /wp-admin/post-new.php1,529 ▼723.44 ▲0.36577.12 ▼33.0255.72 ▲7.66
Media Library /wp-admin/upload.php1,401 ▲44.22 ▲0.0597.44 ▼1.9441.83 ▲0.37
settings /wp-admin/options-general.php?page=apoyl-so-settings8352.0024.5226.67

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/apoyl-so/public/partials/public-display.php:14
    • > PHP Notice
      Undefined variable: arr in wp-content/plugins/apoyl-so/public/partials/public-display.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apoyl-so/admin/partials/admin-display.php:20
    • > PHP Warning
      Use of undefined constant APOYL_SO_URL - assumed 'APOYL_SO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/apoyl-so/public/partials/public-display.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/apoyl-so/public/partials/public-display.php on line 11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: 360, so

apoyl-so/apoyl-so.php 92% from 13 tests

The primary PHP file in "百度站内搜索和360站内搜索" version 1.4.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 264 characters long)

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
There were no executable files found in this plugin285 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP1392142274
CSS1108
JavaScript1203

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods311.11%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
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
public/img/so.png2.53KB1.67KB▼ 33.80%