83% part-content-encryption

Code Review | 部分内容加密

WordPress plugin 部分内容加密 scored83%from 54 tests.

About plugin

  • Plugin page: part-content-encr...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 11, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 16
  • Update frequency: every 31.4 days
  • Top authors: sosel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /736 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.00MB] [CPU: ▼7.23ms] Passed 4 tests

Server-side resources used by 部分内容加密
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.71 ▼0.71
Dashboard /wp-admin3.32 ▼0.0344.30 ▼14.74
Posts /wp-admin/edit.php3.37 ▲0.0146.01 ▼1.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.68 ▼11.47
Media Library /wp-admin/upload.php3.24 ▲0.0034.45 ▲4.59

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

部分内容加密: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3014.20 ▼0.141.64 ▼0.1544.52 ▲5.97
Dashboard /wp-admin2,195 ▲185.66 ▼0.0695.44 ▼2.3140.04 ▼7.36
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0139.50 ▲0.8636.82 ▲5.23
Add New Post /wp-admin/post-new.php1,526 ▼023.19 ▲0.16663.05 ▼19.9449.43 ▲2.46
Media Library /wp-admin/upload.php1,400 ▼34.30 ▼0.0096.01 ▼5.1341.08 ▼4.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/part-content-encryption/index.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("捐款链接地址")
  • Screenshots: Add descriptions for screenshots #4, #5 in part-content-encryption/assets to your readme.txt
Please take inspiration from this readme.txt

part-content-encryption/index.php 85% from 13 tests

Analyzing the main PHP file in "部分内容加密" version 1.1.1
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("part-content-encryption.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 198 characters long)

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 plugin79 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS16556
PHP131223

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin