89% mview

Code Review | mView 豆瓣电影

WordPress plugin mView 豆瓣电影 scored 89% from 54 tests.

About plugin

  • Plugin page: mview
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6.1
  • WordPress version: 5.8.1
  • First release: Sep 28, 2016
  • Latest release: Nov 3, 2016
  • Number of updates: 15
  • Update frequency: every 2.4 days
  • Top authors: afcold (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 892 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by mView 豆瓣电影
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1938.01 ▲17.01
Dashboard /wp-admin3.13 ▲0.0745.20 ▼6.20
Posts /wp-admin/edit.php3.18 ▲0.0744.84 ▼8.61
Add New Post /wp-admin/post-new.php5.49 ▲0.0595.86 ▼562.47
Media Library /wp-admin/upload.php3.07 ▲0.0732.51 ▼0.55

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for mView 豆瓣电影
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲11315.76 ▼0.2310.71 ▼1.5351.86 ▲2.81
Dashboard /wp-admin2,978 ▲415.87 ▼0.04143.73 ▼9.62113.75 ▼19.57
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0168.99 ▲0.6491.98 ▼8.40
Add New Post /wp-admin/post-new.php1,503 ▼18018.51 ▼0.37370.68 ▼10.47115.72 ▲2.09
Media Library /wp-admin/upload.php1,812 ▲25.01 ▼0.01150.74 ▼13.78125.88 ▲6.50
mView /wp-admin/core.php260.900.0411.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/mview/mview.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mview/libs/setting.php:29

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/core.php
    • > Network (severe)
    wp-admin/core.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: mview

mview/mview.php Passed 13 tests

Analyzing the main PHP file in "mView 豆瓣电影" version 1.0.3
32 characters long description:
mView plugin build for wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected19,657 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25,0564,79019,068
PHP48638572
JSON20016
CSS1071

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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