10% wp-simple-web-services

Code Review | WP Simple Web Services

WordPress plugin WP Simple Web Services scored 10% from 54 tests.

About plugin

  • Plugin page: wp-simple-web-ser...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2013
  • Latest release: Dec 10, 2013
  • Number of updates: 14
  • Update frequency: every 0.5 days
  • Top authors: barrykooij (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 5,586 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-simple-web-services/wp-simple-web-services.php+174
    Function create_function() is deprecated

Server metrics [RAM: ▼1.93MB] [CPU: ▼53.08ms] Passed 4 tests

Analyzing server-side resources used by WP Simple Web Services
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.405.12 ▼37.39
Dashboard /wp-admin2.07 ▼1.2312.59 ▼36.54
Posts /wp-admin/edit.php2.08 ▼1.285.83 ▼43.76
Add New Post /wp-admin/post-new.php2.08 ▼3.815.79 ▼94.61
Media Library /wp-admin/upload.php2.08 ▼1.155.59 ▼27.03

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Simple Web Services
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6113.26 ▼1.491.58 ▼0.6537.61 ▼9.54
Dashboard /wp-admin2,224 ▲365.90 ▲1.01106.04 ▼0.1038.37 ▼7.24
Posts /wp-admin/edit.php2,110 ▲212.01 ▼0.0339.38 ▼1.2733.36 ▲1.24
Add New Post /wp-admin/post-new.php1,545 ▲3123.60 ▲5.95678.56 ▼18.2655.73 ▼1.20
Media Library /wp-admin/upload.php1,409 ▲184.23 ▲0.0297.26 ▼2.6741.58 ▼1.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wp-simple-web-services/wp-simple-web-services.php+174
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 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 50% 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-simple-web-services/wp-simple-web-services.php:29

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: rest, json, web service, webservice

wp-simple-web-services/wp-simple-web-services.php Passed 13 tests

"WP Simple Web Services" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
107 characters long description:
Simple WordPress Rest Web Services. Add JSON REST web services to your WordPress website with a few clicks.

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
Everything looks great! No dangerous files found in this plugin429 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6191220386
JavaScript217743

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.00
▷ Minimum class complexity2.00
▷ Maximum class complexity30.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods720.59%
▷ Public methods2264.71%
▷ Protected methods00.00%
▷ Private methods1235.29%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin