74% tieba-emotion

Code Review | Tieba Emotion

WordPress plugin Tieba Emotion scored74%from 54 tests.

About plugin

  • Plugin page: tieba-emotion
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1.0-4.7
  • WordPress version: 6.3.1
  • First release: Mar 9, 2017
  • Latest release: Mar 9, 2017
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: ganlv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /948 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼61.90ms] Passed 4 tests

An overview of server-side resources used by Tieba Emotion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.68 ▼35.41
Dashboard /wp-admin2.06 ▼1.286.22 ▼69.64
Posts /wp-admin/edit.php2.06 ▼1.296.33 ▼43.20
Add New Post /wp-admin/post-new.php2.06 ▼3.825.54 ▼99.35
Media Library /wp-admin/upload.php2.06 ▼1.175.35 ▼30.37

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Tieba Emotion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲10215.81 ▲1.169.44 ▲7.6642.28 ▼0.99
Dashboard /wp-admin2,203 ▲265.63 ▲0.05129.99 ▲27.4239.02 ▼0.56
Posts /wp-admin/edit.php2,111 ▲112.21 ▲0.2682.76 ▲44.1133.05 ▼2.56
Add New Post /wp-admin/post-new.php1,534 ▲623.28 ▲0.28688.87 ▼16.3948.75 ▼4.25
Media Library /wp-admin/upload.php1,411 ▲144.13 ▼0.07116.07 ▲6.5643.91 ▼1.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the tieba-emotion handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/tieba-emotion/tieba-emotion.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (/assets/screenshot-1.png) image required
You can take inspiration from this readme.txt

tieba-emotion/tieba-emotion.php Passed 13 tests

The main file in "Tieba Emotion" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
24 characters long description:
贴吧表情前端替换

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
Success! There were no dangerous files found in this plugin413 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3368402
CSS1006
PHP14205

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.00
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%
Functions0
▷ Named functions00.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 are no PNG files in this plugin