83% lamlim-button

Code Review | الزر -لملم-

WordPress plugin الزر -لملم- scored83%from 54 tests.

About plugin

  • Plugin page: lamlim-button
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Nov 23, 2012
  • Latest release: Dec 21, 2016
  • Number of updates: 14
  • Update frequency: every 106.3 days
  • Top authors: bml13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,036 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.30MB] [CPU: ▼18.06ms] Passed 4 tests

Server-side resources used by الزر -لملم-
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0326.62 ▼19.55
Dashboard /wp-admin3.36 ▲0.0150.67 ▼3.29
Posts /wp-admin/edit.php3.41 ▲0.0544.13 ▼0.30
Add New Post /wp-admin/post-new.php4.65 ▼1.2444.20 ▼49.08
Media Library /wp-admin/upload.php3.28 ▲0.0537.30 ▲1.96

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
lmlm_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for الزر -لملم-
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.79 ▲0.171.80 ▼1.0444.09 ▼0.09
Dashboard /wp-admin2,224 ▲364.86 ▼0.0196.74 ▼16.6788.01 ▲47.62
Posts /wp-admin/edit.php2,104 ▲151.99 ▼0.0235.50 ▼1.6835.24 ▲0.10
Add New Post /wp-admin/post-new.php1,680 ▲13822.43 ▲4.20670.71 ▲61.1846.93 ▼3.60
Media Library /wp-admin/upload.php1,403 ▲184.13 ▼0.01122.48 ▲20.4255.63 ▲11.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/lamlim-button/lamlim-config.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lamlim-button/inc/public-display-functions.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/lamlim-button/inc/admin-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/lamlim-button/lamlim-config.php:7

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (صفحة الإعدادات.), #2 (الزر "لملم" كما هو ظاهر أسفل التدوينة.)
You can take inspiration from this readme.txt

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

This is the main PHP file of "الزر -لملم-" version 0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 218 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected545 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP592122282
CSS1337162
PO File1293588
JavaScript14213

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
3 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png52.71KB20.67KB▼ 60.80%
img/icon16.png0.71KB0.74KB0.00%
screenshot-2.png33.30KB14.41KB▼ 56.72%