74% simple-relative-content

Code Review | Simple Relative Content

WordPress plugin Simple Relative Content scored74%from 54 tests.

About plugin

  • Plugin page: simple-relative-c...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 19, 2012
  • Latest release: Apr 18, 2014
  • Number of updates: 7
  • Update frequency: every 73.6 days
  • Top authors: pabois (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,584 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.23MB] [CPU: ▼42.37ms] Passed 4 tests

Analyzing server-side resources used by Simple Relative Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7312.75 ▼29.36
Dashboard /wp-admin2.78 ▼0.5315.70 ▼30.08
Posts /wp-admin/edit.php2.78 ▼0.5817.75 ▼29.71
Add New Post /wp-admin/post-new.php2.78 ▼3.1116.14 ▼80.32
Media Library /wp-admin/upload.php2.78 ▼0.4513.39 ▼21.16

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple Relative Content
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.30 ▼0.951.67 ▼0.3043.34 ▲4.11
Dashboard /wp-admin2,209 ▲184.88 ▲0.00111.38 ▼3.6540.87 ▼5.05
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0638.63 ▼1.0938.32 ▲1.47
Add New Post /wp-admin/post-new.php1,542 ▲2318.25 ▼4.95594.30 ▼113.4753.02 ▼2.37
Media Library /wp-admin/upload.php1,391 ▲64.19 ▲0.0197.03 ▼7.7540.67 ▼1.41

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
    • > Warning in wp-content/plugins/simple-relative-content/simple-relative-content.php+18
    Use of undefined constant WP_SITEURL - assumed 'WP_SITEURL' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/simple-relative-content/simple-relative-content.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: wp_siteurl, uri, production, relative uri, site url...

simple-relative-content/simple-relative-content.php Passed 13 tests

The main PHP file in "Simple Relative Content" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
70 characters long description:
Make all attachments urls stored in bdd relative to the WP_SITEURL url

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected119 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1201895
PO File15624

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected