10% a-simple-backend

Code Review | A Simple Backend

WordPress plugin A Simple Backend scored10%from 54 tests.

About plugin

  • Plugin page: a-simple-backend
  • Plugin version: 1.0.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Feb 7, 2016
  • Latest release: Nov 24, 2020
  • Number of updates: 77
  • Update frequency: every 23.3 days
  • Top authors: evanspress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,083 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/a-simple-backend/helpers/Plugin.php+625
    unserialize(): Error at offset 0 of 1 bytes

Server metrics [RAM: ▼1.80MB] [CPU: ▼58.50ms] Passed 4 tests

A check of server-side resources used by A Simple Backend
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.274.30 ▼38.91
Dashboard /wp-admin2.21 ▼1.095.82 ▼47.47
Posts /wp-admin/edit.php2.21 ▼1.156.07 ▼40.06
Add New Post /wp-admin/post-new.php2.21 ▼3.686.04 ▼107.55
Media Library /wp-admin/upload.php2.21 ▼1.026.95 ▼28.40

Server storage [IO: ▲0.36MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 46 new files
Database: no new tables, 20 new options
New WordPress options
widget_recent-comments
asimplebackendimage_default_size
asimplebackendemail
db_upgraded
asimplebackendplugins
asimplebackendcache_option
theysaidso_admin_options
asimplebackendsanitized_links
asimplebackendeditor_hidden
asimplebackendimage_default_align
...

Browser metrics Passed 4 tests

A Simple Backend: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,945 ▼81613.91 ▼0.3715.23 ▲13.3235.70 ▼9.65
Dashboard /wp-admin1,332 ▼8485.50 ▼0.1080.73 ▼19.5230.30 ▼15.35
Posts /wp-admin/edit.php1,940 ▼1632.48 ▲0.4640.31 ▼4.9841.65 ▲3.49
Add New Post /wp-admin/post-new.php1,844 ▲31821.85 ▼1.09595.79 ▼38.9940.30 ▼18.31
Media Library /wp-admin/upload.php1,477 ▲774.43 ▲0.1793.62 ▼9.7744.57 ▼7.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/a-simple-backend/helpers/Plugin.php+625
    unserialize(): Error at offset 0 of 1 bytes
  • Zombie WordPress options were found after uninstall: 20 options
    • asimplebackendcache_option
    • asimplebackendwelcome_message
    • asimplebackendrss_url
    • asimplebackendeditor_hidden
    • asimplebackendplugins
    • asimplebackendimage_default_align
    • widget_theysaidso_widget
    • asimplebackendemail
    • asimplebackendmenu
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/a-simple-backend/views/admin/footer.php
    • > /wp-content/plugins/a-simple-backend/views/admin/feed.php
    • > /wp-content/plugins/a-simple-backend/views/admin/welcome.php
    • > /wp-content/plugins/a-simple-backend/a-simple-backend.php
  • 34× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/a-simple-backend/views/admin/menu.php on line 5
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/a-simple-backend/views/admin/menu.php on line 15
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/a-simple-backend/views/admin/toplink.php on line 15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/a-simple-backend/views/admin/link.php:21
    • > PHP Notice
      Undefined variable: welcome_message in wp-content/plugins/a-simple-backend/views/admin/welcome.php on line 3
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/a-simple-backend/views/admin/page.php on line 5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/a-simple-backend/views/admin/notice.php:1
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/a-simple-backend/views/admin/page.php on line 15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/a-simple-backend/views/admin/menu.php:21
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/a-simple-backend/views/admin/toplink.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: No tags were detected
You can take inspiration from this readme.txt

a-simple-backend/a-simple-backend.php Passed 13 tests

Analyzing the main PHP file in "A Simple Backend" version 1.0.5.2
88 characters long description:
A Simple Backend allows designers to create a minimalist WordPress CMS admin experience!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin5,306 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP204582703,281
JavaScript83591751,764
CSS2582261

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity108.80
▷ Minimum class complexity1.00
▷ Maximum class complexity354.00
Average method complexity5.53
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods119
▷ Static methods54.20%
▷ Public methods11899.16%
▷ Protected methods00.00%
▷ Private methods10.84%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flush.png4.25KB1.06KB▼ 74.98%
images/settings.png3.10KB0.71KB▼ 77.13%
images/question.png3.09KB0.70KB▼ 77.23%
images/nav_icon.png3.25KB0.81KB▼ 75.21%
images/view.png3.12KB0.77KB▼ 75.34%