84% linkedin-perfect-share

Code Review | LinkedIn Perfect Share

WordPress plugin LinkedIn Perfect Share scored84%from 54 tests.

About plugin

  • Plugin page: linkedin-perfect-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.9
  • WordPress version: 6.3.1
  • First release: May 6, 2014
  • Latest release: May 6, 2014
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mirkolofio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.47ms] Passed 4 tests

An overview of server-side resources used by LinkedIn Perfect Share
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.10 ▼0.58
Dashboard /wp-admin3.31 ▲0.0045.70 ▲0.80
Posts /wp-admin/edit.php3.36 ▲0.0046.97 ▼0.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.78 ▲1.73
Media Library /wp-admin/upload.php3.23 ▲0.0036.58 ▲4.16

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for LinkedIn Perfect Share
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▲0.571.82 ▼0.1143.12 ▼2.84
Dashboard /wp-admin2,209 ▲234.85 ▼0.0497.22 ▼20.4840.53 ▼4.76
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0340.59 ▲0.3235.55 ▼2.93
Add New Post /wp-admin/post-new.php1,533 ▲1323.34 ▼0.22631.79 ▼50.1649.36 ▼3.37
Media Library /wp-admin/upload.php1,382 ▼04.20 ▲0.0494.37 ▼6.5640.98 ▼3.72

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/linkedin-perfect-share/templates/linkedin_template.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/linkedin-perfect-share/linkedin-perfect-share.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

linkedin-perfect-share/linkedin-perfect-share.php Passed 13 tests

The principal PHP file in "LinkedIn Perfect Share" v. 1.0.0 is loaded by WordPress automatically on each request
64 characters long description:
Provides precise Open Graph data to LinkedIn for perfect sharing

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
Everything looks great! No dangerous files found in this plugin37 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2171237

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.34MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/screenshot-full.png53.61KB22.49KB▼ 58.05%
media/placeit.png209.42KB66.13KB▼ 68.42%
media/screenshot.png68.41KB27.51KB▼ 59.78%
media/placeit-80x80.png14.11KB5.99KB▼ 57.51%