84% wp-senpy

Code Review | wp-senpy

WordPress plugin wp-senpy scored84%from 54 tests.

About plugin

  • Plugin page: wp-senpy
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Aug 29, 2017
  • Latest release: Aug 29, 2017
  • Number of updates: 3
  • Update frequency: every 16.0 days
  • Top authors: agericke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /560 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.23ms] Passed 4 tests

Server-side resources used by wp-senpy
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.84 ▼4.08
Dashboard /wp-admin3.43 ▲0.1244.98 ▼6.87
Posts /wp-admin/edit.php3.54 ▲0.1849.16 ▲4.65
Add New Post /wp-admin/post-new.php6.01 ▲0.1293.07 ▼0.18
Media Library /wp-admin/upload.php3.35 ▲0.1238.20 ▲2.20
About /wp-admin/admin.php?page=sentiment_and_emotion_analysis_plugin_menu_about3.3130.26
Comments Layout /wp-admin/admin.php?page=sentiment_and_emotion_analysis_plugin_menu_comment_layout3.3133.20
Emotion & Sentiment Menu /wp-admin/admin.php?page=sentiment_and_emotion_analysis_plugin_menu3.3128.68

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
wpsenpy_settings
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for wp-senpy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.78 ▲0.391.69 ▼0.3546.05 ▼3.07
Dashboard /wp-admin2,230 ▲454.92 ▲0.07102.44 ▼12.9841.51 ▼1.95
Posts /wp-admin/edit.php2,116 ▲272.00 ▼0.0540.64 ▼11.1035.57 ▼7.80
Add New Post /wp-admin/post-new.php1,542 ▲2823.39 ▲5.75643.14 ▲6.9956.84 ▼5.00
Media Library /wp-admin/upload.php1,409 ▲214.26 ▲0.0395.96 ▼4.9243.13 ▲0.07
About /wp-admin/admin.php?page=sentiment_and_emotion_analysis_plugin_menu_about8722.0324.1537.31
Comments Layout /wp-admin/admin.php?page=sentiment_and_emotion_analysis_plugin_menu_comment_layout8142.0325.9225.94
Emotion & Sentiment Menu /wp-admin/admin.php?page=sentiment_and_emotion_analysis_plugin_menu9302.0222.1024.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-senpy/wp-senpy.php:33

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: analysis, emotions, comments, sentiments, senpy

wp-senpy/wp-senpy.php 92% from 13 tests

The main PHP script in "wp-senpy" version 0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin995 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2255106737
PO File27492258

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.62MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/joy.png194.81KB37.14KB▼ 80.94%
images/disgust.png91.71KB35.14KB▼ 61.68%
images/negative-fear.png61.07KB19.88KB▼ 67.45%
images/neutral-emotion.png16.43KB7.93KB▼ 51.71%
images/anger.png162.34KB37.79KB▼ 76.72%