84% json-api-cincopa

Code Review | JSON API Cincopa

WordPress plugin JSON API Cincopa scored84%from 54 tests.

About plugin

  • Plugin page: json-api-cincopa
  • Plugin version: 2.5.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2014
  • Latest release: Mar 13, 2023
  • Number of updates: 49
  • Update frequency: every 63.7 days
  • Top authors: parorrey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,693 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.05ms] Passed 4 tests

A check of server-side resources used by JSON API Cincopa
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0144.16 ▼7.27
Dashboard /wp-admin3.58 ▼0.0651.69 ▼15.48
Posts /wp-admin/edit.php3.69 ▲0.0151.64 ▼0.20
Add New Post /wp-admin/post-new.php6.16 ▲0.01108.84 ▼1.24
Media Library /wp-admin/upload.php3.50 ▲0.0139.82 ▲3.57

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for JSON API Cincopa
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.38 ▲0.121.84 ▼0.0243.02 ▼2.10
Dashboard /wp-admin2,200 ▲205.57 ▼0.1291.87 ▼10.1442.77 ▼1.65
Posts /wp-admin/edit.php2,108 ▲81.97 ▼0.0734.63 ▼1.9834.92 ▼0.91
Add New Post /wp-admin/post-new.php1,553 ▲823.04 ▼0.29668.90 ▼9.7659.68 ▲4.68
Media Library /wp-admin/upload.php1,411 ▲174.21 ▼0.0498.41 ▼1.3543.23 ▲2.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 4× 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/json-api-cincopa/json-api-cincopa.php:29
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/json-api-cincopa/json-api-cincopa.php on line 21
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/json-api-cincopa/json-api-cincopa.php on line 21
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/json-api-cincopa/json-api-cincopa.php on line 21

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: json api, restful cincopa easy albums

json-api-cincopa/json-api-cincopa.php Passed 13 tests

This is the main PHP file of "JSON API Cincopa" version 2.5.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
82 characters long description:
Extends the JSON API for RESTful BuddyPress Cincopa galleries listing for any user

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
Success! There were no dangerous files found in this plugin118 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2692081
PO File14737

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity4.50
▷ Minimum method complexity4.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin