10% ram108-sape

Code Review | SAPE Links

WordPress plugin SAPE Links scored 10% from 54 tests.

About plugin

  • Plugin page: ram108-sape
  • Plugin version: 0.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.3-4.2
  • WordPress version: 5.8.1
  • First release: Oct 25, 2013
  • Latest release: Mar 14, 2015
  • Number of updates: 44
  • Update frequency: every 11.5 days
  • Top authors: ram108 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

600+ active / 14,536 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/ram108-sape/include/ram108_sape_widget.php+66
    Function create_function() is deprecated

Server metrics [RAM: ▼1.82MB] [CPU: ▼186.18ms] Passed 4 tests

A check of server-side resources used by SAPE Links
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.81 ▼0.919.29 ▼11.48
Dashboard /wp-admin1.83 ▼1.236.91 ▼37.27
Posts /wp-admin/edit.php1.83 ▼1.285.33 ▼35.61
Add New Post /wp-admin/post-new.php1.83 ▼3.616.55 ▼648.31
Media Library /wp-admin/upload.php1.83 ▼1.186.10 ▼23.53
[ram108] SAPE Links /wp-admin/options-general.php?page=ram108-sape1.835.47

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 2 new options
New WordPress options
ram108-sape
widget_ram108-swidget

Browser metrics Passed 4 tests

Checking browser requirements for SAPE Links
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,698 ▲10215.85 ▲0.3810.52 ▲2.3344.63 ▼2.40
Dashboard /wp-admin2,984 ▲535.85 ▼0.11134.13 ▼8.23112.44 ▲2.08
Posts /wp-admin/edit.php2,753 ▲172.68 ▼0.0266.41 ▲3.0291.48 ▲0.38
Add New Post /wp-admin/post-new.php2,068 ▲38519.51 ▲1.10370.05 ▲5.22109.69 ▼1.32
Media Library /wp-admin/upload.php1,827 ▲175.04 ▲0.03143.41 ▼14.72121.82 ▲8.18
[ram108] SAPE Links /wp-admin/options-general.php?page=ram108-sape1,2642.2155.1488.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/ram108-sape/include/ram108_sape_widget.php+66
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_ram108-swidget

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
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=ram108-sape
    • > Deprecated in wp-content/plugins/ram108-sape/include/ram108_sape_widget.php+66
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=ram108-sape
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in ram108_sape_widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=ram108-sape
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ram108-sape
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ram108-sape/include/ram108_sape_widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ram108_sape_plugin' not found in wp-content/plugins/ram108-sape/include/ram108_sape.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ram108-sape/include/plugin_admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ram108-sape/library/settings.php:10

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 errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

ram108-sape/plugin.php 85% from 13 tests

This is the main PHP file of "SAPE Links" version 0.5.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ram108-sape.php" instead of "plugin.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 178 characters long)

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
Good job! No executable or dangerous file extensions detected339 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP612236329
CSS11010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.20
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods3294.12%
▷ Protected methods00.00%
▷ Private methods25.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin