90% rosariosis-rest-api

Code Review | RosarioSIS REST API

WordPress plugin RosarioSIS REST API scored90%from 54 tests.

About plugin

  • Plugin page: rosariosis-rest-api
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Feb 27, 2020
  • Latest release: Feb 27, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: rosariosis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /477 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.58ms] Passed 4 tests

Analyzing server-side resources used by RosarioSIS REST API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.73 ▲1.66
Dashboard /wp-admin3.39 ▲0.0946.09 ▼3.90
Posts /wp-admin/edit.php3.51 ▲0.1543.13 ▼4.68
Add New Post /wp-admin/post-new.php5.97 ▲0.0982.59 ▼6.82
Media Library /wp-admin/upload.php3.31 ▲0.0934.16 ▲1.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for RosarioSIS REST API
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.431.63 ▼0.3144.25 ▲2.79
Dashboard /wp-admin2,206 ▲145.84 ▲0.73104.15 ▼8.6543.05 ▲1.53
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0234.46 ▼1.2034.58 ▼4.06
Add New Post /wp-admin/post-new.php1,533 ▲1323.39 ▲0.21666.77 ▼22.5855.48 ▼6.45
Media Library /wp-admin/upload.php1,382 ▼94.29 ▲0.0496.06 ▼3.4640.08 ▼5.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • rosariosis_rest_api_version
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
4 plugin tags: connect, school, sis, student

rosariosis-rest-api/rosariosis-rest-api.php Passed 13 tests

"RosarioSIS REST API" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
86 characters long description:
Plugin helper to connect to the RosarioSIS (free Student Information System) REST API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,316 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP94688951,123
JavaScript52515134
PO File171045
JSON10014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity30.17
▷ Minimum class complexity5.00
▷ Maximum class complexity72.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods71
▷ Static methods34.23%
▷ Public methods6997.18%
▷ Protected methods00.00%
▷ Private methods22.82%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-128x128.png2.43KB2.43KB0.04%
assets/img/icon-256x256.png4.47KB4.47KB0.00%
assets/img/icon.png4.22KB4.47KB0.00%