90% jsonpress

Code Review | JSONPress

WordPress plugin JSONPress scored90%from 54 tests.

About plugin

  • Plugin page: jsonpress
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.6
  • WordPress version: 6.3.1
  • First release: Aug 27, 2013
  • Latest release: Aug 28, 2013
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: takien (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,099 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 gracefully, with no errors

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

An overview of server-side resources used by JSONPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.28 ▲4.10
Dashboard /wp-admin3.35 ▲0.0446.68 ▼7.10
Posts /wp-admin/edit.php3.46 ▲0.1150.83 ▲0.64
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.73 ▲5.25
Media Library /wp-admin/upload.php3.27 ▲0.0439.00 ▼0.52
About /wp-admin/admin.php?page=jsonpress-about3.2334.95
JSONPress /wp-admin/admin.php?page=jsonpress-settings-page3.2332.20

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

JSONPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲3014.28 ▼0.011.84 ▼0.3045.48 ▲3.77
Dashboard /wp-admin2,225 ▲545.61 ▼0.0391.04 ▼6.1474.64 ▲24.12
Posts /wp-admin/edit.php2,127 ▲272.01 ▲0.0335.85 ▲1.3136.69 ▲1.33
Add New Post /wp-admin/post-new.php1,559 ▲3323.16 ▲5.72732.62 ▲36.6254.13 ▼1.86
Media Library /wp-admin/upload.php1,427 ▲274.16 ▲0.03112.05 ▼3.1973.04 ▲25.01
About /wp-admin/admin.php?page=jsonpress-about8182.0728.6725.50
JSONPress /wp-admin/admin.php?page=jsonpress-settings-page8942.2025.1224.96

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
8 plugin tags: restful, json, jsonp, rest, api...

jsonpress/jsonpress.php Passed 13 tests

The primary PHP file in "JSONPress" version 0.3 is used by WordPress to initiate all plugin functionality
22 characters long description:
JSON API for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin851 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP515279815
Markdown117036

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity29.00
▷ Minimum class complexity18.00
▷ Maximum class complexity49.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
options/images/about-large.png1.26KB0.29KB▼ 76.66%
options/images/icon-setting-small.png0.80KB0.67KB▼ 16.12%
options/images/about-small.png1.26KB0.29KB▼ 76.66%
options/images/icon-setting-large.png1.78KB1.44KB▼ 19.16%