84% highlight-and-share

Code Review | Highlight and Share – Click to Tweet Block and Text Highlighter

WordPress plugin Highlight and Share – Click to Tweet Block and Text Highlighter scored84%from 54 tests.

About plugin

  • Plugin page: highlight-and-share
  • Plugin version: 4.5.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 2, 2013
  • Latest release: Sep 24, 2023
  • Number of updates: 233
  • Update frequency: every 15.5 days
  • Top authors: ronalfy (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

1,000+ active /76,338 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.17MB] [CPU: ▲0.14ms] Passed 4 tests

An overview of server-side resources used by Highlight and Share – Click to Tweet Block and Text Highlighter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.67 ▲1.2149.28 ▲5.43
Dashboard /wp-admin4.46 ▲1.1653.26 ▲0.65
Posts /wp-admin/edit.php4.52 ▲1.1651.72 ▲1.42
Add New Post /wp-admin/post-new.php7.14 ▲1.2598.50 ▼6.93
Media Library /wp-admin/upload.php4.38 ▲1.1542.93 ▲6.48
Highlight and Share /wp-admin/options-general.php?page=highlight-and-share4.3036.55

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 214 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
highlight-and-share-theme-options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
highlight-and-share-block-editor-options
highlight-and-share-email-settings
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Highlight and Share – Click to Tweet Block and Text Highlighter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,006 ▲26014.79 ▲0.343.76 ▲1.8039.10 ▼8.06
Dashboard /wp-admin2,210 ▲224.84 ▼1.01107.88 ▼9.0044.74 ▲0.50
Posts /wp-admin/edit.php2,125 ▲362.02 ▼0.0139.72 ▲1.7434.58 ▲1.97
Add New Post /wp-admin/post-new.php6,200 ▲4,66719.44 ▼3.92897.87 ▲212.4555.38 ▲1.94
Media Library /wp-admin/upload.php1,395 ▲74.16 ▼0.0695.73 ▼19.8843.50 ▼7.19
Highlight and Share /wp-admin/options-general.php?page=highlight-and-share1,3935.77181.1658.26

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 DLXPlugins\\HAS\\add_action() in wp-content/plugins/highlight-and-share/highlight-and-share.php:94

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: highlight, highlight text, click share, social media, select text

highlight-and-share/highlight-and-share.php Passed 13 tests

This is the main PHP file of "Highlight and Share – Click to Tweet Block and Text Highlighter" version 4.5.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
86 characters long description:
Select text, inline highlight, or use a Click to Share block and show social networks.

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
Everything looks great! No dangerous files found in this plugin17,067 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
SVG27009,208
PHP246751,6024,080
CSS161731393,080
JSON200683
JavaScript1401116

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity32.19
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods155
▷ Static methods7950.97%
▷ Public methods14694.19%
▷ Protected methods00.00%
▷ Private methods95.81%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants2
▷ Global constants2100.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
14 PNG files occupy 0.47MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/plugin-logo-horizontal.png29.44KB14.06KB▼ 52.25%
img/screenshot-green.png21.12KB9.93KB▼ 52.98%
img/screenshot-white.png24.61KB11.42KB▼ 53.60%
img/heart.png3.44KB1.63KB▼ 52.56%
img/screenshot-brand.png27.28KB12.56KB▼ 53.95%