78% tinywebdb-api

Code Review | TinyWebDB API

WordPress plugin TinyWebDB API scored 78% from 54 tests.

About plugin

  • Plugin page: tinywebdb-api
  • Plugin version: 0.2.11
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: Apr 13, 2020
  • Number of updates: 28
  • Update frequency: every 96.9 days
  • Top authors: chen420 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,760 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.21ms] Passed 4 tests

An overview of server-side resources used by TinyWebDB API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.76 ▼11.49
Dashboard /wp-admin3.35 ▲0.0547.10 ▲2.39
Posts /wp-admin/edit.php3.40 ▲0.0547.98 ▼3.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0589.13 ▼5.60
Media Library /wp-admin/upload.php3.27 ▲0.0533.61 ▼0.26
Log tail /wp-admin/admin.php?page=tinywebdb_log3.2129.97
TinyWebDB /wp-admin/admin.php?page=tinywebdb_api3.2131.50

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for TinyWebDB API
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8614.47 ▲0.161.64 ▼0.7839.02 ▼4.05
Dashboard /wp-admin2,221 ▲335.83 ▲0.97102.75 ▼9.0339.28 ▼4.09
Posts /wp-admin/edit.php2,119 ▲272.03 ▲0.0242.17 ▼0.9336.97 ▲0.03
Add New Post /wp-admin/post-new.php1,538 ▼423.42 ▲5.38691.33 ▲32.3649.65 ▼6.89
Media Library /wp-admin/upload.php1,418 ▲274.26 ▲0.0498.46 ▼1.9342.34 ▼2.86
Log tail /wp-admin/admin.php?page=tinywebdb_log7851.7228.2226.45
TinyWebDB /wp-admin/admin.php?page=tinywebdb_api1,0001.6923.8536.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tinywebdb_api
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tinywebdb_api
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=tinywebdb_log
    • > Notice in wp-content/plugins/tinywebdb-api/menus.php+38
    Undefined index: logfile
    • > GET request to /wp-admin/admin.php?page=tinywebdb_api
    • > Notice in wp-content/plugins/tinywebdb-api/menus.php+85
    Undefined index: issubmitted

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tinywebdb-api/menus.php:210
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tinywebdb-api/tinywebdb-api.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (The TinyWebDB API management page in the WordPress Admin.) image not found
You can look at the official readme.txt

tinywebdb-api/tinywebdb-api.php Passed 13 tests

The principal PHP file in "TinyWebDB API" v. 0.2.11 is loaded by WordPress automatically on each request
81 characters long description:
a AppInventor TinyWebDB API plugin, use you WordPress as a TinyWebDB web service.

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
There were no executable files found in this plugin537 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP47932401
Markdown2650136

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods555.56%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png93.71KB29.14KB▼ 68.90%