10% fantazy-sidebar

Code Review | Fantazy Sidebar

WordPress plugin Fantazy Sidebar scored 10% from 54 tests.

About plugin

  • Plugin page: fantazy-sidebar
  • Plugin version: 1.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 5.8.1
  • First release: May 29, 2015
  • Latest release: Apr 11, 2020
  • Number of updates: 31
  • Update frequency: every 57.5 days
  • Top authors: JIHAD SINNAOUR (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active / 3,550 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/fantazy-sidebar/core/Framework.php+77
    require_once(wp-content/plugins/fantazy-sidebar\core/system/Plugin.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.00MB] [CPU: ▼169.85ms] Passed 4 tests

A check of server-side resources used by Fantazy Sidebar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1232.77 ▲12.00
Dashboard /wp-admin3.06 ▲0.0041.59 ▼2.93
Posts /wp-admin/edit.php3.11 ▲0.0042.81 ▼2.50
Add New Post /wp-admin/post-new.php5.42 ▼0.01103.36 ▼636.95
Media Library /wp-admin/upload.php3.00 ▼0.0138.48 ▼37.00

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 460 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Fantazy Sidebar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.23 ▲0.217.72 ▼0.5553.04 ▲6.17
Dashboard /wp-admin2,970 ▲395.91 ▲0.01147.94 ▲15.79118.74 ▲0.07
Posts /wp-admin/edit.php2,736 ▼32.69 ▼0.0265.22 ▼1.7394.80 ▲10.24
Add New Post /wp-admin/post-new.php1,615 ▲3421.45 ▲4.17299.39 ▼121.11114.75 ▼27.90
Media Library /wp-admin/upload.php1,810 ▲35.03 ▲0.00165.18 ▼14.66126.32 ▼20.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/fantazy-sidebar/core/Framework.php+77
    require_once(wp-content/plugins/fantazy-sidebar\core/system/Plugin.php): failed to open stream: No such file or directory
  • The plugin did not uninstall correctly, leaving 460 files (1.91MB) in the plugin directory
    • (new file) changelog.txt
    • (new file) core/Framework.php
    • (new file) core/assets/vendor/bootstrap/bootstrap.bundle.min.js
    • (new file) core/assets/admin/js/main.js
    • (new file) core/assets/front/js/fantazy-sidebar.min.js
    • (new file) core/assets/front/js/fantazy-sidebar.js
    • (new file) README.md
    • (new file) core/assets/font/roboto.css
    • (new file) core/assets/front/js/main.js
    • (new file) core/assets/admin/css/style.css
    • ...
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • recovery_mode_email_last_sent

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fantazy-sidebar/fantazy-sidebar.php
    • > /wp-content/plugins/fantazy-sidebar/uninstall.php
  • 169× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/fantazy-sidebar/core/vendor/twig/twig/src/Extension/ProfilerExtension.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\odeVisitor\\AbstractNodeVisitor' not found in wp-content/plugins/fantazy-sidebar/core/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/fantazy-sidebar/core/vendor/twig/twig/src/TokenParser/DoTokenParser.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Error\\Error' not found in wp-content/plugins/fantazy-sidebar/core/vendor/twig/twig/src/Sandbox/SecurityError.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/fantazy-sidebar/core/vendor/twig/twig/src/Node/ForNode.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/fantazy-sidebar/core/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/fantazy-sidebar/core/vendor/twig/twig/src/TokenParser/BlockTokenParser.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'fantazy_sidebar\\core\\system\\libraries\\Settings' not found in wp-content/plugins/fantazy-sidebar/core/system/libraries/Page.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/fantazy-sidebar/core/vendor/twig/twig/src/Node/ImportNode.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/fantazy-sidebar/core/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: amazon, floating, wordpress, sidebar, ads

fantazy-sidebar/fantazy-sidebar.php 92% from 13 tests

"Fantazy Sidebar" version 1.6.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected17,681 lines of code in 439 files:
LanguageFilesBlank linesComment linesLines of code
PHP4133,7666,68914,963
CSS71431,288
C1171186860
SVG100200
JavaScript101560191
PO File23737104
JSON20052
C/C++ Header171315
m41215
Markdown1103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity160.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces30
Interfaces32
Traits0
Classes372
▷ Abstract classes143.76%
▷ Concrete classes35896.24%
▷ Final classes51.40%
Methods1,052
▷ Static methods646.08%
▷ Public methods86081.75%
▷ Protected methods16515.68%
▷ Private methods272.57%
Functions84
▷ Named functions7083.33%
▷ Anonymous functions1416.67%
Constants48
▷ Global constants00.00%
▷ Class constants48100.00%
▷ Public constants48100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin