83% rawr

Code Review | RAWR for WordPress

WordPress plugin RAWR for WordPress scored 83% from 54 tests.

About plugin

  • Plugin page: rawr
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-4.7.4
  • WordPress version: 6.3.1
  • First release: Jan 26, 2017
  • Latest release: Jun 2, 2017
  • Number of updates: 17
  • Update frequency: every 7.4 days
  • Top authors: natterstefan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 776 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.15MB] [CPU: ▼3.44ms] Passed 4 tests

A check of server-side resources used by RAWR for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1544.74 ▲4.05
Dashboard /wp-admin3.45 ▲0.1545.81 ▼0.22
Posts /wp-admin/edit.php3.56 ▲0.2146.55 ▼1.54
Add New Post /wp-admin/post-new.php6.06 ▲0.1786.91 ▼11.29
Media Library /wp-admin/upload.php3.37 ▲0.1536.10 ▼0.72

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
rawr_options
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by RAWR for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲12113.20 ▼1.452.07 ▲0.0942.26 ▼4.35
Dashboard /wp-admin2,275 ▲905.87 ▲0.02101.26 ▼0.0586.34 ▲40.03
Posts /wp-admin/edit.php2,161 ▲722.18 ▲0.1536.40 ▼0.3938.09 ▲2.54
Add New Post /wp-admin/post-new.php6,564 ▲5,03120.38 ▼2.67983.49 ▲307.6940.24 ▼15.86
Media Library /wp-admin/upload.php1,457 ▲664.16 ▼0.0998.26 ▼7.2690.70 ▲44.28

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rawr/admin/partials/rawr-admin-settings.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 31 tag instead of maximum 10
You can take inspiration from this readme.txt

rawr/rawr.php 92% from 13 tests

The entry point to "RAWR for WordPress" version 0.1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 170 characters long)

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
Good job! No executable or dangerous file extensions detected1,304 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP14162685749
CSS6105464
SVG20085
JavaScript3106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.73
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods55
▷ Static methods916.36%
▷ Public methods4276.36%
▷ Protected methods00.00%
▷ Private methods1323.64%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.60MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png118.28KB43.46KB▼ 63.26%
screenshot-2.png263.78KB85.89KB▼ 67.44%
admin/assets/rawr-logo.png19.12KB1.68KB▼ 91.22%
admin/assets/rawr-logo-menu.png1.03KB1.08KB0.00%
public/img/rawr-fallback-image.png35.72KB9.93KB▼ 72.20%