83% rsg-compiled-libraries

Code Review | RSG Compiled Libraries

WordPress plugin RSG Compiled Libraries scored 83% from 54 tests.

About plugin

  • Plugin page: rsg-compiled-libr...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: May 9, 2019
  • Latest release: May 19, 2019
  • Number of updates: 8
  • Update frequency: every 1.4 days
  • Top authors: rynergalaus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 495 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by RSG Compiled Libraries
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.19 ▲0.12
Dashboard /wp-admin3.45 ▲0.1449.50 ▲2.64
Posts /wp-admin/edit.php3.56 ▲0.2148.04 ▲2.75
Add New Post /wp-admin/post-new.php6.05 ▲0.1685.85 ▼5.03
Media Library /wp-admin/upload.php3.37 ▲0.1440.54 ▲3.58
Libraries /wp-admin/admin.php?page=rsgcld3.3432.21
RSG Addons /wp-admin/admin.php?page=rsg_addons_page3.3432.46

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 84 new files
Database: no new tables, 8 new options
New WordPress options
RSGCLD_VERSION
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
rsgcld_login_modal_template

Browser metrics Passed 4 tests

Checking browser requirements for RSG Compiled Libraries
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21514.13 ▼0.127.49 ▲5.7541.98 ▼0.27
Dashboard /wp-admin2,243 ▲555.01 ▼0.89105.10 ▼0.0139.50 ▼2.15
Posts /wp-admin/edit.php2,126 ▲372.11 ▲0.0836.49 ▲0.7237.15 ▲3.88
Add New Post /wp-admin/post-new.php1,547 ▲1317.64 ▼5.33661.46 ▼4.2259.47 ▼0.60
Media Library /wp-admin/upload.php1,425 ▲404.30 ▲0.0394.50 ▼13.7445.28 ▼1.72
Libraries /wp-admin/admin.php?page=rsgcld1,4202.1427.5278.19
RSG Addons /wp-admin/admin.php?page=rsg_addons_page8162.1425.4336.40

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • rsgcld_login_modal_template
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/rsg-compiled-libraries/templates/rsg-popup_menu.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/rsg-compiled-libraries/templates/rsg-login-blue.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/rsg-compiled-libraries/my-lib/rsg/functions/wp_bootstrap_navwalker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/rsg-compiled-libraries/my-lib/rsg/functions/wp_bootstrap_navwalker.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/rsg-compiled-libraries/templates/rsg-login.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (21 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

rsg-compiled-libraries/rsgcld.php 69% from 13 tests

"RSG Compiled Libraries" version 0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/lang")
  • Main file name: The principal plugin file should be the same as the plugin slug ("rsg-compiled-libraries.php" instead of "rsgcld.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 279 characters long)

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
Good job! No executable or dangerous file extensions detected28,496 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript211,8521,10614,566
CSS213,457498,179
SVG41124,495
PHP7109133748
Sass2275262
LESS1115152
Markdown117086
Ruby1208

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity23.00
▷ Minimum class complexity11.00
▷ Maximum class complexity35.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 1.00MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
my-lib/rsg/screenshot-5.png7.70KB7.54KB▼ 2.01%
my-lib/rsg/gears.png760.37KB88.79KB▼ 88.32%
my-lib/rsg/default-login-modal.png14.25KB14.88KB0.00%
my-lib/rsg/icon-256x256.png98.86KB9.83KB▼ 90.06%
my-lib/rsg/blue-login-modal.png11.06KB11.26KB0.00%