83% acquaintsoft-sidebar-generator

Code Review | Acquaintsoft sidebar generator

WordPress plugin Acquaintsoft sidebar generator scored 83% from 54 tests.

About plugin

  • Plugin page: acquaintsoft-side...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 5.9.2
  • First release: Jan 30, 2017
  • Latest release: Feb 2, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: itcoderr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 675 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▼292.76ms] Passed 4 tests

This is a short check of server-side resources used by Acquaintsoft sidebar generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.4571.96 ▲12.96
Dashboard /wp-admin3.80 ▲0.4041.25 ▲6.10
Posts /wp-admin/edit.php4.09 ▲0.4539.57 ▲3.38
Add New Post /wp-admin/post-new.php7.36 ▲0.3697.70 ▼1,183.21
Media Library /wp-admin/upload.php3.75 ▲0.4626.65 ▲2.69

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 1 new option
New WordPress options
acq_modifiable

Browser metrics Passed 4 tests

Checking browser requirements for Acquaintsoft sidebar generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲3615.93 ▲0.356.21 ▲0.222.63 ▼3.20
Dashboard /wp-admin2,902 ▲516.22 ▲0.09117.71 ▼25.54153.59 ▼14.45
Posts /wp-admin/edit.php2,701 ▲73.24 ▲0.0163.85 ▼1.13142.60 ▼3.87
Add New Post /wp-admin/post-new.php1,794 ▲13317.09 ▼4.02451.26 ▲32.03167.79 ▲9.42
Media Library /wp-admin/upload.php1,705 ▲75.57 ▲0.07139.97 ▼32.47188.98 ▼3.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 1 option in the database
    • acq_modifiable

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/acquaintsoft-sidebar-generator/view/popup.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Admin' not found in wp-content/plugins/acquaintsoft-sidebar-generator/include/admin/inc/class-admin-session.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acquaintsoft-sidebar-generator/include/acquaintsoft_sidebar_generator_class.php:519
    • > PHP Fatal error
      Uncaught Error: Class 'ACS_Class' not found in wp-content/plugins/acquaintsoft-sidebar-generator/view/sidebar.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Admin' not found in wp-content/plugins/acquaintsoft-sidebar-generator/include/admin/inc/class-admin-array.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Admin' not found in wp-content/plugins/acquaintsoft-sidebar-generator/include/admin/inc/class-admin-debug.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Admin' not found in wp-content/plugins/acquaintsoft-sidebar-generator/include/admin/inc/class-admin-updates.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/acquaintsoft-sidebar-generator/view/delete.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Admin' not found in wp-content/plugins/acquaintsoft-sidebar-generator/include/admin/inc/class-admin-ui.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/acquaintsoft-sidebar-generator/acquaintsoft_sidebar_generator.php:34

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 93% from 29 tests

readme.txt Passed 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
7 plugin tags: sidebars, personalize, sidebar, widget, widgets...

acquaintsoft-sidebar-generator/acquaintsoft_sidebar_generator.php 85% from 13 tests

The principal PHP file in "Acquaintsoft sidebar generator" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acquaintsoft-sidebar-generator.php" instead of "acquaintsoft_sidebar_generator.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin6,510 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP155862133,006
JavaScript26153302,490
CSS3120111,014

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 101)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity35.50
▷ Minimum class complexity1.00
▷ Maximum class complexity129.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity101.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes16.25%
▷ Concrete classes1593.75%
▷ Final classes00.00%
Methods149
▷ Static methods4026.85%
▷ Public methods11577.18%
▷ Protected methods1912.75%
▷ Private methods1510.07%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants39
▷ Global constants1333.33%
▷ Class constants2666.67%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/3.png2.15KB1.60KB▼ 25.47%