84% rational-theme-server

Code Review | Rational Theme Server

WordPress plugin Rational Theme Server scored84%from 54 tests.

About plugin

  • Plugin page: rational-theme-se...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4
  • WordPress version: 6.3.1
  • First release: Feb 15, 2016
  • Latest release: Feb 22, 2016
  • Number of updates: 6
  • Update frequency: every 1.8 days
  • Top authors: jeremyHixon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /596 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼14.03ms] Passed 4 tests

An overview of server-side resources used by Rational Theme Server
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0322.91 ▼14.16
Dashboard /wp-admin3.40 ▲0.0644.97 ▼13.83
Posts /wp-admin/edit.php3.51 ▲0.1646.67 ▼3.83
Add New Post /wp-admin/post-new.php5.98 ▲0.1080.10 ▼24.30
Media Library /wp-admin/upload.php3.32 ▲0.1034.15 ▼2.03
Theme Server /wp-admin/themes.php?page=rts_menu3.2831.99

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • The plugin illegally modified 1 file (0.73KB) outside of "wp-content/plugins/rational-theme-server/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Rational Theme Server
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.11 ▼1.261.72 ▼0.1540.71 ▲1.91
Dashboard /wp-admin2,201 ▲135.90 ▲0.01105.69 ▲7.7539.58 ▼2.84
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0443.03 ▲2.9535.46 ▼0.91
Add New Post /wp-admin/post-new.php1,521 ▼721.85 ▲3.64648.82 ▲50.9864.88 ▲13.09
Media Library /wp-admin/upload.php1,392 ▲104.22 ▼0.0196.73 ▼1.4441.65 ▼3.32
Theme Server /wp-admin/themes.php?page=rts_menu1,5436.62132.3359.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/themes.php?page=rts_menu
    • > Warning in wp-content/plugins/rational-theme-server/rational-theme-server.php+574
    Invalid argument supplied for foreach()
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=rts_menu
    • > Notice in wp-content/plugins/rational-theme-server/rational-theme-server.php+425
    Trying to access array offset on value of type bool

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/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
5 plugin tags: download, responsive, mobile, theme, developer

rational-theme-server/rational-theme-server.php Passed 13 tests

Analyzing the main PHP file in "Rational Theme Server" version 1.0.2
75 characters long description:
Plugin for theme developers to preview and serve downloads of their themes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected555 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP262153478
CSS15077

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2485.71%
▷ Protected methods00.00%
▷ Private methods414.29%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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