84% crudlab-google-plus

Code Review | CRUDLab Google Plus Button

WordPress plugin CRUDLab Google Plus Button scored 84% from 54 tests.

About plugin

  • Plugin page: crudlab-google-plus
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-3.0
  • WordPress version: 6.3.1
  • First release: Apr 17, 2015
  • Latest release: May 13, 2016
  • Number of updates: 10
  • Update frequency: every 39.3 days
  • Top authors: amirk27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,178 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
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼0.79ms] Passed 4 tests

A check of server-side resources used by CRUDLab Google Plus Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.25 ▼0.10
Dashboard /wp-admin3.41 ▲0.1146.89 ▼3.40
Posts /wp-admin/edit.php3.52 ▲0.1751.45 ▲0.81
Add New Post /wp-admin/post-new.php5.99 ▲0.1195.20 ▼0.46
Media Library /wp-admin/upload.php3.33 ▲0.1037.48 ▲3.49

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 182 new files
Database: 1 new table, 7 new options
New tables
wp_clgp
New WordPress options
CLGooglePlusBtn_db_version
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for CRUDLab Google Plus Button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲8513.78 ▼0.4111.03 ▲9.2839.48 ▼13.78
Dashboard /wp-admin2,224 ▲364.95 ▼0.9394.97 ▼9.1385.88 ▲44.93
Posts /wp-admin/edit.php2,107 ▲212.01 ▲0.0137.32 ▲0.2834.38 ▲1.95
Add New Post /wp-admin/post-new.php1,539 ▲1118.74 ▲0.21690.80 ▲59.4166.94 ▲11.57
Media Library /wp-admin/upload.php1,403 ▲184.08 ▼0.1298.40 ▼3.9364.71 ▲19.78

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • CLGooglePlusBtn_db_version
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/crudlab-google-plus/crudlab-googleplus.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% 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:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
Please take inspiration from this readme.txt

crudlab-google-plus/crudlab-googleplus.php 92% from 13 tests

The principal PHP file in "CRUDLab Google Plus Button" v. 1.0.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("crudlab-google-plus.php" instead of "crudlab-googleplus.php")

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
No dangerous file extensions were detected50,559 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
SVG220128,376
JavaScript111,9661,97311,368
CSS743367,064
JSON2002,139
LESS39731711
PHP25817646
HTML2816255

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity29.50
▷ Minimum class complexity26.00
▷ Maximum class complexity33.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2592.59%
▷ Protected methods00.00%
▷ Private methods27.41%
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

All PNG images should be compressed to minimize bandwidth usage for end users
48 PNG files occupy 0.37MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/img/icons/png/Gift-Box.png11.49KB5.19KB▼ 54.86%
dist/img/icons/png/Clipboard.png3.84KB2.00KB▼ 47.98%
docs/assets/img/demo/browser-2x.png1.99KB0.75KB▼ 62.52%
docs/assets/img/demo/html-icon.png4.24KB1.89KB▼ 55.49%
dist/img/login/icon.png7.33KB3.18KB▼ 56.59%