78% payprlike-button

Code Review | PayPRLike

WordPress plugin PayPRLike scored78%from 54 tests.

About plugin

  • Plugin page: payprlike-button
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2014
  • Latest release: Jul 24, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: vadim.hariton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /623 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.13ms] Passed 4 tests

An overview of server-side resources used by PayPRLike
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.13 ▼3.85
Dashboard /wp-admin3.35 ▲0.0543.31 ▼6.44
Posts /wp-admin/edit.php3.46 ▲0.1147.25 ▲5.67
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.51 ▼7.46
Media Library /wp-admin/upload.php3.27 ▲0.0434.02 ▲1.24
PayPRLike Button /wp-admin/options-general.php?page=payprlike-options3.2430.35

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_payprlike_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for PayPRLike
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,036 ▲29014.49 ▲0.1332.20 ▲30.4345.90 ▼1.67
Dashboard /wp-admin2,210 ▲224.93 ▲0.0797.05 ▼21.8639.06 ▼11.78
Posts /wp-admin/edit.php2,090 ▲12.01 ▲0.0239.40 ▲3.6435.39 ▲5.29
Add New Post /wp-admin/post-new.php1,517 ▼217.62 ▼5.40584.79 ▼40.8654.93 ▲0.31
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.0393.79 ▼0.6740.30 ▼5.76
PayPRLike Button /wp-admin/options-general.php?page=payprlike-options8372.0625.4526.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_payprlike_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/payprlike-button/payprlike.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/payprlike-button/views/options-page-wrapper.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/payprlike-button/class.payprlike-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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: Please fix this invalid URI: ""
The official readme.txt might help

payprlike-button/payprlike.php 85% from 13 tests

The primary PHP file in "PayPRLike" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payprlike-button.php" instead of "payprlike.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin501 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP56216225
CSS159160
JavaScript11935116

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.32
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods1270.59%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_inc/pplpopup.png3.74KB2.51KB▼ 32.98%
_inc/popup-s.png3.16KB1.83KB▼ 41.97%
_inc/popup-c.png3.58KB1.96KB▼ 45.17%
_inc/mypr.png4.38KB2.49KB▼ 43.20%
_inc/cancel.png2.60KB1.16KB▼ 55.34%